From 9afc9231c0215dd11988ee70aeee171591f55fbe Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 18 Nov 2022 09:40:10 -0500 Subject: [PATCH] Add spdx relationship encoding for dependencies (#1342) Co-authored-by: Keith Zantow --- syft/formats/common/spdxhelpers/to_format_model.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syft/formats/common/spdxhelpers/to_format_model.go b/syft/formats/common/spdxhelpers/to_format_model.go index 1ac0a1f42..ec4e3c55b 100644 --- a/syft/formats/common/spdxhelpers/to_format_model.go +++ b/syft/formats/common/spdxhelpers/to_format_model.go @@ -362,6 +362,8 @@ func lookupRelationship(ty artifact.RelationshipType) (bool, RelationshipType, s switch ty { case artifact.ContainsRelationship: return true, ContainsRelationship, "" + case artifact.DependencyOfRelationship: + return true, DependencyOfRelationship, "" case artifact.OwnershipByFileOverlapRelationship: return true, OtherRelationship, fmt.Sprintf("%s: indicates that the parent package claims ownership of a child package since the parent metadata indicates overlap with a location that a cataloger found the child package by", ty) }