Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

BUG: DejaCode exported CycloneDX SBOM does not retain dependency relationship

Offen
#271 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
security

Rechercherichtung

Reproduziere den Workflow über Actions > Load packages from SBOMs und Share > CycloneDX mit einer CycloneDX 1.6 SBOM mit transitiven Abhängigkeiten. Vergleiche das importierte Inventar und die Abhängigkeitsbeziehungen mit den exportierten Abhängigkeiten und prüfe das zugehörige Issue #122. Erledigt ist dies, wenn der Import direkte und indirekte Abhängigkeiten unterscheidet und der Export jedes Paket mit dependsOn-Verweisen auf seine tatsächlichen Abhängigkeiten ausgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug design needed enhancement HighPriority td

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

  1. Create a product in DejaCode
  2. Generate an SBOM for a product with a tool such as cdxgen, where there are transitive dependencies
  3. Use "Actions > Load packages from SBOMs" with "Scan all packages of this product post-import" checked
  4. Once the import is completed you should see the inventory populated and dependencies filled
  5. Use "Share > CycloneDX" to export an SBOM in format version 1.6
  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.

Vorherrschende Sprache
Python
Sterne
52
Forks
30
Ø Merge
4 Std. 57 Min.
Gemergte PRs (30 T.)
21

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aboutcode-org/dejacode

Alle Issues in aboutcode-org/dejacode

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.