Repository navigation
Fix: preserve dependencies across repeated SBOM node occurrences - #932
Open
Ross-Sherlock wants to merge 1 commit into
Open
Ross-Sherlock wants to merge 1 commit into
Ross-Sherlock wants to merge 1 commit into
Conversation
Track visited graph nodes by pointer instead of artifact ID so distinct occurrences with different children are all traversed. Retain component deduplication and dependency merging by reference. Add regression coverage for module ordering, differing grandchildren, pointer cycles, and Maven dependency-tree JSON with module-specific exclusions.
Ross-Sherlock
requested a deployment
to
frogbot
October 29, 2026 22:11 — with
GitHub Actions
Waiting
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This branch is waiting to be deployed
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.
DepsTreeToSbomcan silently omit transitive components when multiple module trees contain the same artifact with different children, such as Maven modules with different dependency exclusions.For example:
Module A → X (Y excluded)
Module B → X → Y
Previously, visiting X in module A marked its artifact ID as visited globally. The converter then skipped X’s subtree in module B, omitting Y from the SBOM. Component coverage could therefore depend on module order.
This change tracks visited graph nodes by pointer instead of artifact ID, allowing each distinct occurrence’s children to be traversed. Existing helpers continue to deduplicate components and merge dependency edges by reference. Revisiting the same node object still stops traversal, preserving cycle protection.
Regression tests cover:
The converter regression failed before the fix, returning five of seven reachable components, and passes afterward.
devbranch.