fix(scan): scope --reach-use-only-pregenerated-sboms to analysis input only - #1445
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 3 commits into
Open
fix(scan): scope --reach-use-only-pregenerated-sboms to analysis input only#1445Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 3 commits into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 3 commits into
Conversation
…t only The flag was also filtering which manifest files got uploaded as part of the scan, restricting it to pre-generated CDX/SPDX/facts files. That wasn't the intent: it should only control what reachability analysis uses as input (already forwarded to Coana as --use-only-pregenerated-sboms), not what gets included in the scan itself.
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
--reach-use-only-pregenerated-sbomswas also filtering which manifest files get uploaded as part of the scan (restricting the upload to CDX/SPDX/Socket-facts files), in addition to controlling what Coana uses as input for reachability analysis.filterToPregeneratedSboms/getPregeneratedSbomPatternsinhandle-create-new-scan.mts); the scan now always uploads all discovered package paths (minus a stray.socket.facts.json) regardless of this flag.--use-only-pregenerated-sbomsinperform-reachability-analysis.mts) is unchanged.Test plan
pnpm build:dist:srcpnpm test:unit src/commands/scan/handle-create-new-scan.test.mts src/commands/scan/perform-reachability-analysis.test.mts(18 tests pass)npx eslinton both edited files (clean)Note
Medium Risk
Changes what files are sent on full scans when
--reachand--reach-use-only-pregenerated-sbomsare used together—broader uploads than before, which can affect scan scope and results for users who relied on the old behavior.Overview
--reach-use-only-pregenerated-sbomsno longer limits which manifest files are uploaded with the scan. Uploads now always include all discovered package paths (still dropping a stray.socket.facts.jsonand appending Coana’s fresh reachability report), regardless of that flag.The flag’s effect is limited to reachability analysis input (still passed through to Coana as
--use-only-pregenerated-sboms). The upload-side filtering helpers (filterToPregeneratedSboms,getPregeneratedSbomPatterns, and themicromatchimport) were removed fromhandle-create-new-scan.mts. Flag help text was updated to match.Release 1.1.147 with a changelog entry.
Reviewed by Cursor Bugbot for commit a5ccebc. Configure here.