feat: add new --allow-incomplete-sbom-flag [CSENG-175]#6731
feat: add new --allow-incomplete-sbom-flag [CSENG-175]#6731snyk-abedonik wants to merge 12 commits intomainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
This comment has been minimized.
This comment has been minimized.
eae551c to
99d0f84
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Testing SummaryToday, we conducted testing of the following commands. The results indicate that their output is consistent between the released CLI build and the local build with the applied changes. SBOM Generation
Test Execution (JSON Output)
Dependency Graph and Verbose Output
ConclusionAcross all tested commands, the output matches between the released CLI build and the local build incorporating the latest changes. snyk sbom --format cyclonedx1.6+json --all-projects.json snyk sbom --format cyclonedx1.6+json.json snyk test --json --all-projects.json snyk test --json.json snyk test --prune-repeated-subdependencies --print-effective-graph -- -Dverbose.json snyk test --prune-repeated-subdependencies --print-effective-graph-with-errors -- -Dverbose.json Note: Dep Graph computed by these commands doesn't have any nodes with
|
PR Reviewer Guide 🔍
|
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
snyk sbom --all-projectspreviously used a fail-fast mode: if any project in the workspace failed to resolve its dependencies (missing lockfile, unsupported manifest, malformed JSON, etc.) the entire SBOM generation was aborted and no output was produced.This PR implements the TypeScript plugin-layer changes required to support a new
--allow-incomplete-sbomflag onsnyk sbom. When the flag is set:ScanErrorentries (subject path + human-readable message) and forwarded to the SBOM service alongside the successful dep-graphs, so the service can embed them in the final document.The user-facing flag (
--allow-incomplete-sbom) is surfaced by the Go CLI layer (cliv2). When present it passes--print-output-jsonl-with-errorsto the TypeScript legacy CLI, which is the internal wire option implemented here.What are the relevant tickets?
References
https://docs.google.com/document/d/1vhRKlienHz1kbrCI-2BJ3maO6ykmlAz-hSApgo8MGEw/edit
https://docs.google.com/document/d/1i4exfAq3Dvoy_mKwQAwL3LYE6_Qkt7jQVYVOSzijZdw/edit
https://docs.google.com/document/d/1j0gNbzCALFF3WfIxLd5PVBtglJb4kYGQdheoM27VMaY/edit