Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Dec 8, 2023
1 parent c5dc033 commit ec6e606
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions scripts/template-helper-functions.jq
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ def sbom:
{
name: .name,
versionInfo: .version,
supplier: (if .supplier then .supplier else "NOASSERTION" end),
SPDXID: ("SPDXRef-Package--" + .name),
externalRefs: [
{
referenceCategory: "PACKAGE-MANAGER",
referenceType: "purl",
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
]
}
;

0 comments on commit ec6e606

Please sign in to comment.