BUG: DejaCode exported CycloneDX SBOM does not retain dependency relationship
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the workflow through Actions > Load packages from SBOMs and Share > CycloneDX using a CycloneDX 1.6 SBOM with transitive dependencies. Compare the imported inventory and dependency relationships with the exported dependencies and review related issue #122. Done means the import preserves direct versus indirect dependencies and the export emits each package with dependsOn references to its actual dependencies.
Written by the indexing model from the issue text.
Description
Describe the bug
Current DejaCode versions already represent the relationships between packages in a product's inventory and their dependencies with other packages. However, when exporting an SBOM that relationship is not correctly represented in the resulting file. This was tested with CycloneDX as output format.
The resulting file list all packages as if they are direct dependencies. This is incorrect, has some may only be transitive dependencies. This is highly important to get right for regulatory purposes as it indicates who is responsible for fixing issues or updating versions. If it is a direct dependency then the organisation developing the product is directly responsible. However, if a dependency of the product has transitive dependencies where a package is outdated, then the organisation developing the product may have to wait for a patch of that dependency to be released. Furthermore, displaying transitive dependencies as direct dependencies is simply inaccurate for the purpose of software component analysis.
To Reproduce
- Create a product in DejaCode
- Generate an SBOM for a product with a tool such as cdxgen, where there are transitive dependencies
- Use "Actions > Load packages from SBOMs" with "Scan all packages of this product post-import" checked
- Once the import is completed you should see the inventory populated and dependencies filled
- Use "Share > CycloneDX" to export an SBOM in format version 1.6
- Open the SBOM in an editor of your choice an see that all packages are listed as direct dependencies under the key "dependencies" and within that "dependsOn".
Expected behavior
Instead of having all packages listed in "dependsOn" as direct dependencies, they should be listed as follow:
- All dependencies should each have an entry like:
{ "ref": "pkg:pkgmanager/[email protected]", "dependsOn": [] }, - "dependsOn" should reference the PURLs of other packages that they depend on, if any (just like dependencies already do in DejaCode's internal model)
Important: The SBOM import must also ensure that only direct dependencies are listed as packages in the inventory and indirect/transitive dependencies are listed as dependecies. Otherwise this cannot be fixed afterwards. Hence, this issue is related to https://github.com/aboutcode-org/dejacode/issues/122
Screenshots
n.a.
Context (OS, Browser, Device, etc.):
n.a.
- Dominant language
- Python
- Stars
- 53
- Forks
- 32
- Avg merge
- 16h 44m
- Merged PRs (30d)
- 10
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/dejacode
-
Unify product Clone, "Save as new" and admin "Save as new" into a single clone featurePossibly taken @d4rshnn claimed this 10 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
aboutcode-org/dejacode#603 ·
Maintainers usually reply within 1 day
-
design needed enhancement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
aboutcode-org/dejacode#561 · 3 comments ·
Maintainers usually reply within 1 day
-
Enhancement request: Refine License Category - Copyleft LimitedMay be free again @hesa claimed this 138 days ago, and no pull request is open. Opendesign needed enhancement
aboutcode-org/dejacode#499 · 13 comments · 3 assignees ·
Maintainers usually reply within 1 day
-
BUG: Product overview page splits product with many versions across pagesMay be free again A pull request for this issue was closed without being merged. Openbug design needed enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
aboutcode-org/dejacode#460 ·
Maintainers usually reply within 1 day
-
design needed
Difficulty 5/5 Over a week Newbie friendliness 20/100
aboutcode-org/dejacode#452 · 2 comments ·
Maintainers usually reply within 1 day
All issues in aboutcode-org/dejacode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mohanraj00/entelos#200 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
sweep
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
bketelsen/truenas-mcp#77 ·
Maintainers usually reply within 1 day
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
sandbox-quantum/switch#2163 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openedx/xblock-lti-consumer#765 ·
Maintainers usually reply within 1 day