Skip to content

Augment does not handle SPDX DESCRIBES relationships properly #227

@par-anderssonTE

Description

@par-anderssonTE

If augmenting a primary SBOM that does not have a DESCRIBES relationship (not mandatory when there is only one package), DESCRIBES relationships will be added for the augmenting packages (maybe copied from the original secondary input?) but no DESCRIBES relationship is created for the original primary package (which would be mandatory now that there is more than one package/files).

I believe that the specification compliant result after augment (or any merge really) should be:

Primary document/package DESCRIBES SHALL be added if missing when augmenting with additional packages.
Secondary package DESCRIBES sSHALL NOT be created/copied.

The SPDX specification definition of DESCRIBES is a little bit confusing but my interpretation is that a document:
CAN have a document -> package DESCRIBES relationship if there is only one package in the document.
SHALL have a DESCRIBES relationship to the PRIMARY package in the SBOM if there are more than one package included.
SHALL NOT have DESCRIBES relationships to other packages.

I don't know if augment is the only merge strategy that has this problem, but hierarchical seems to behave as expected at least.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions