fix: capture dependencies when parsing SPDX SBOMs (#2869)

Signed-off-by: Russell Haering <russellhaering@gmail.com>
This commit is contained in:
Russell Haering
2024-05-14 09:57:48 -04:00
committed by GitHub
parent 4a18895545
commit e767bcff4b
2 changed files with 67 additions and 0 deletions
@@ -381,6 +381,13 @@ func collectDocRelationships(spdxIDMap map[string]any, doc *spdx.Document) (out
}
} else {
switch helpers.RelationshipType(r.Relationship) {
case helpers.DependencyOfRelationship:
typ = artifact.DependencyOfRelationship
to = toPackage
case helpers.DependsOnRelationship:
typ = artifact.DependencyOfRelationship
to = from
from = toPackage
case helpers.ContainsRelationship:
typ = artifact.ContainsRelationship
to = toPackage