Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit d042c75

Browse files
committed
Suppress packages with no type
1 parent 6513861 commit d042c75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sbom/syft.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ func toPackage(p pkg2.Package, rels []artifact.Relationship, qualifiers map[stri
137137
Locations: make([]types.Location, 0),
138138
}
139139

140+
if p.Type == "" {
141+
return []types.Package{}
142+
}
143+
140144
var sourceNameAndVersion sourcePackage
141145
var virtualPath string
142146

0 commit comments

Comments
 (0)