Skip to content

feat: add new --allow-incomplete-sbom-flag [CSENG-175]#6731

Merged
snyk-abedonik merged 2 commits intomainfrom
feat/CSENG-175-add-new-allow-incomplete-sbom-flag
May 7, 2026
Merged

feat: add new --allow-incomplete-sbom-flag [CSENG-175]#6731
snyk-abedonik merged 2 commits intomainfrom
feat/CSENG-175-add-new-allow-incomplete-sbom-flag

Conversation

@snyk-abedonik
Copy link
Copy Markdown
Contributor

@snyk-abedonik snyk-abedonik commented Apr 16, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

snyk sbom --all-projects previously 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-sbom flag on snyk sbom. When the flag is set:

  • Projects that resolve successfully are included in the generated SBOM as usual.
  • Projects that fail are collected as structured ScanError entries (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-errors to 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

@snyk-abedonik snyk-abedonik requested review from a team as code owners April 16, 2026 10:15
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Apr 16, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

@snyk snyk deleted a comment from snyk-pr-review-bot Bot Apr 17, 2026
@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from eae551c to 99d0f84 Compare April 17, 2026 09:18
@snyk-abedonik snyk-abedonik requested a review from a team as a code owner April 17, 2026 09:18
@snyk snyk deleted a comment from snyk-pr-review-bot Bot Apr 17, 2026
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-abedonik
Copy link
Copy Markdown
Contributor Author

snyk-abedonik commented Apr 23, 2026

Testing Summary

Today, 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

  • snyk sbom --format cyclonedx1.6+json --all-projects
  • snyk sbom --format cyclonedx1.6+json

Test Execution (JSON Output)

  • snyk test --json --all-projects
  • snyk test --json

Dependency Graph and Verbose Output

  • snyk test --prune-repeated-subdependencies --print-effective-graph -- -Dverbose
  • snyk test --prune-repeated-subdependencies --print-effective-graph-with-errors -- -Dverbose

Conclusion

Across all tested commands, the output matches between the released CLI build and the local build incorporating the latest changes.

pom.xml

snyk sbom --format cyclonedx1.6+json --all-projects.json
snyk_darwin_arm64 sbom --format cyclonedx1.6+json --all-projects.json

snyk sbom --format cyclonedx1.6+json.json
snyk_darwin_arm64 sbom --format cyclonedx1.6+json.json

snyk test --json --all-projects.json
snyk_darwin_arm64 test --json --all-projects.json

snyk test --json.json
snyk_darwin_arm64 test --json.json

snyk test --prune-repeated-subdependencies --print-effective-graph -- -Dverbose.json
snyk_darwin_arm64 test --prune-repeated-subdependencies --print-effective-graph -- -Dverbose.json

snyk test --prune-repeated-subdependencies --print-effective-graph-with-errors -- -Dverbose.json
snyk_darwin_arm64 test --prune-repeated-subdependencies --print-effective-graph-with-errors -- -Dverbose.json

Note:

Dep Graph computed by these commands doesn't have any nodes with pruned=true label; however, snyk test --prune-repeated-subdependencies --print-effective-graph -- -Dverbose produces nodes with pruned=true label for the same pom.xml. As a result, it confirms that --allow-incomplete-sbom operates with the complete graph.

  • snyk sbom --format cyclonedx1.6+json --all-projects --allow-incomplete-sbom
  • snyk sbom --format cyclonedx1.6+json --allow-incomplete-sbom

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

This comment has been minimized.

@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch 2 times, most recently from 73a9d7b to a251e35 Compare April 28, 2026 15:34
@snyk-pr-review-bot

This comment has been minimized.

@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from a251e35 to 8c63daf Compare April 28, 2026 15:35
@snyk snyk deleted a comment from snyk-pr-review-bot Bot Apr 28, 2026
@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from 8c63daf to bab5aeb Compare April 28, 2026 15:56
@snyk snyk deleted a comment from snyk-pr-review-bot Bot Apr 28, 2026
@snyk-pr-review-bot

This comment has been minimized.

@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from bab5aeb to 28fd95f Compare April 28, 2026 16:45
@snyk-abedonik snyk-abedonik enabled auto-merge May 6, 2026 08:52
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 6, 2026
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 6, 2026
@snyk-abedonik snyk-abedonik disabled auto-merge May 6, 2026 09:18
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 6, 2026
@snyk-abedonik snyk-abedonik enabled auto-merge May 6, 2026 09:29
@snyk-abedonik snyk-abedonik disabled auto-merge May 6, 2026 10:04
@snyk-abedonik snyk-abedonik enabled auto-merge May 6, 2026 10:07
Comment thread test/jest/acceptance/snyk-sbom/allow-incomplete-sbom.spec.ts Outdated
@CatalinSnyk
Copy link
Copy Markdown
Contributor

issue: Please squash the commits into one before merging

@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from 85cd0d9 to 9733e79 Compare May 6, 2026 19:50
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 6, 2026
@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from 9733e79 to 64b500f Compare May 6, 2026 20:45
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 6, 2026
Comment thread src/lib/snyk-test/run-test.ts Outdated
@snyk-pr-review-bot

This comment has been minimized.

@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from d555648 to 618f805 Compare May 7, 2026 11:46
@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 7, 2026
@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from 618f805 to 306d77f Compare May 7, 2026 12:05
@snyk-pr-review-bot

This comment has been minimized.

Comment thread test/jest/acceptance/snyk-sbom/allow-incomplete-sbom.spec.ts
@snyk-abedonik snyk-abedonik force-pushed the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch from 306d77f to 29ba128 Compare May 7, 2026 12:41
@snyk-pr-review-bot

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Warnings
⚠️ There are multiple commits on your branch, please squash them locally before merging!
⚠️

"Merge branch 'main' into feat/CSENG-175-add-new-allow-incomplete-sbom-flag" is too long. Keep the first line of your commit message under 72 characters.

Generated by 🚫 dangerJS against 103f5f9

@snyk snyk deleted a comment from snyk-pr-review-bot Bot May 7, 2026
@snyk-abedonik snyk-abedonik merged commit 757dd74 into main May 7, 2026
8 checks passed
@snyk-abedonik snyk-abedonik deleted the feat/CSENG-175-add-new-allow-incomplete-sbom-flag branch May 7, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants