We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CreationInfo
1 parent 1870f28 commit e866bd5Copy full SHA for e866bd5
pkg/sbom/spdx/unmarshal.go
@@ -255,6 +255,10 @@ func (s *SPDX) parseExternalReferences(refs []*spdx.PackageExternalReference) (*
255
}
256
257
func (s *SPDX) isTrivySBOM(spdxDocument *spdx.Document) bool {
258
+ if spdxDocument == nil || spdxDocument.CreationInfo == nil || spdxDocument.CreationInfo.Creators == nil {
259
+ return false
260
+ }
261
+
262
for _, c := range spdxDocument.CreationInfo.Creators {
263
if c.CreatorType == "Tool" && strings.HasPrefix(c.Creator, "trivy") {
264
return true
0 commit comments