feat: PE Rich-header fingerprint (offsetscan rich); strip long dashes; add FUNDING - 0.4.0 - #22
Merged
Merged
Conversation
…; add FUNDING - 0.4.0
Contributor
Reviewer's GuideAdds a new Sequence diagram for the new offsetscan rich subcommandsequenceDiagram
actor User
participant offsetscan as offsetscan_main
participant expand_paths
participant run
participant fs as fs_read
participant rich
User->>offsetscan: offsetscan rich path --recurse
offsetscan->>expand_paths: expand_paths(path, recurse)
expand_paths-->>offsetscan: files
offsetscan->>run: run(files, ndjson, closure)
loop for each file
run->>fs: read(file)
fs-->>run: data
run->>rich: parse_rich(data, file_path)
rich-->>run: RichInfo
run-->>User: RichInfo (JSON/NDJSON)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Rich header parsing duplicates some DOS/PE header logic (MZ check, e_lfanew handling) that already exists in
pe.rs; consider centralizing this in a shared helper to avoid future divergence between modules. - In
rich.rs, you import theDigesttrait fromsha2but use it only withMd5; it would be clearer to pull the trait from the same hashing crate (or fromdigest) to avoid the cross-crate coupling in this module.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Rich header parsing duplicates some DOS/PE header logic (MZ check, e_lfanew handling) that already exists in `pe.rs`; consider centralizing this in a shared helper to avoid future divergence between modules.
- In `rich.rs`, you import the `Digest` trait from `sha2` but use it only with `Md5`; it would be clearer to pull the trait from the same hashing crate (or from `digest`) to avoid the cross-crate coupling in this module.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Add PE Rich-header parsing and fingerprinting as a new OffsetScan subcommand and release version 0.4.0.
New Features:
offsetscan richsubcommand to parse PE Rich headers and emit a build-toolchain fingerprint hash (RichHash) and comp.id records.Enhancements:
clusterandrichsubcommands sit outside the OffsetInspect compatibility contract.Build:
Documentation:
Chores: