Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitive Dependencies not showing in Dependency-Graph #1513

Closed
almitte opened this issue Apr 5, 2022 · 7 comments
Closed

Transitive Dependencies not showing in Dependency-Graph #1513

almitte opened this issue Apr 5, 2022 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@almitte
Copy link

almitte commented Apr 5, 2022

Current Behavior:

Transitive dependencies where the child node (second hierarchy level) is inside the "components" of the parent node (first hierarchy level) are not being displayed in Dependency-Graph. Error was noticed after using hierarchical Merge with CycloneDX-Cli, as only the first hierarchy level (the primary-components of the merged SBoMs) are showing in Dependency-Graph in Dtrack, but no second hierarchy level components.
Not working Code:
grafik(4)
Result:
2

Working Code:
grafik(5)
Result:
grafik(2)

Dependencies:
grafik(6)

Steps to Reproduce:

Add a child node to "components" of a first hierarchy level parent node and add this child node to "Dependencies" as well.
Also merge two valid SBoMs using the CycloneDX-Cli with the --hierarchical Setting. (Resulting SBoMs Dependency-Graph in Dtrack only displays first hierarchy level components.)

Expected Behavior:

Dependency-Graph should display transitive dependencies.

Environment:

  • Dependency-Track Version: latest
  • Distribution: Docker
  • BOM Format & Version: JSON, 1.4
  • Database Server: SQL-Server

Additional Details:

(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

@stevespringett stevespringett added duplicate This issue or pull request already exists and removed in triage labels Apr 5, 2022
@stevespringett
Copy link
Member

This is a frontend issue.

Duplicate of DependencyTrack/frontend#85

@roadSurfer
Copy link

I am a bit confused about if this should this be fixed or not. It's marked as duplicate, DependencyTrack/frontend#85 is closed, but I am hitting the issue in 4.7.0 after running a hierarchical merge.

@roadSurfer
Copy link

roadSurfer commented Jan 26, 2023

To illustrate what I am seeing, I created two simple BOMs for foo and bar, and uploaded those to DT. Both of these displayed fine:
foo_depgraph
bar_depgraph

I then ran a hierarchical merge to create a BOM for foobar: docker run --rm -v <bom_location>:/tmp/target --name cyclonedx cyclonedx/cyclonedx-cli:0.24.2 merge --input-files /tmp/target/bom_foo.xml /tmp/target/bom_bar.xml --input-format xml --output-file /tmp/target/bom_foobar.xml --output-format xml --hierarchical --group tld.domain --name foobar --version 0.0.1-SNAPSHOT
Uploading that to DT shows the problem (although the BOM itself seems fine):
foobar_depgraph
Note how there is no expansion of the foo and bar dependencies when expected.

boms.zip

Edit: Swicthing to JSON does not seem to help.

Edit 2: Navigating to a component (e.g. commons-lang3) and then clicking on the "Show in dependency graph" icon under the name does not work either.

@roadSurfer
Copy link

Looking in the DB (postgres in this case), I can see that direct_dependencies is empty for foo. This to me implies that the fault lies somewhere withing the ingestion of the BOM.
missing_directs

@stevespringett
Copy link
Member

@almitte Closing this issue as the navigation down to transitive dependencies was resolved in v4.7.

@roadSurfer the issue you're experiencing is due to both of your direct dependencies not having any dependences of their own.

Neither of these dependencies have any dependencies defined in the BOM

tld.domain.foo@0.0.1-SNAPSHOT:pkg:maven/tld.domain/foo@0.0.1-SNAPSHOT?type=jar
tld.domain.bar@0.0.1-SNAPSHOT:pkg:maven/tld.domain/bar@0.0.1-SNAPSHOT?type=jar

@roadSurfer
Copy link

@stevespringett - perhaps this is the wrong place, but I can see the dependencies defined on lines 5917 and 6199 of bom_foobar.xml from the Zip file.
(Note: There was a typo in the original zip where the PURL had jarr instead of jar, but fixing that did not alter behaviour.)

@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants