From 5a86c34c5a3ef370b3d22c398d45ccab53bd64bd Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Tue, 31 Oct 2023 10:14:36 -0400 Subject: [PATCH] Add support for package supplier in SBOM --- scripts/template-helper-functions.jq | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/template-helper-functions.jq b/scripts/template-helper-functions.jq index 2eb903e7..d15c189c 100644 --- a/scripts/template-helper-functions.jq +++ b/scripts/template-helper-functions.jq @@ -25,12 +25,9 @@ def sbom: referenceLocator: ("pkg:generic/" + .name + "@" + .version + "?" + (.params | [to_entries[] | .key + "=" + .value] | join("\u0026"))) } ], - licenseDeclared: (if .licenses | length > 0 then - (.licenses | join(" AND ")) - else - "NOASSERTION" - end) } + + if .licenses then { licenseDeclared: (.licenses | join(" AND ")) } else {} end + + if .supplier then { supplier: .supplier } else {} end ] } ;