Skip to content

Commit

Permalink
sbom: allow collector to scan library packages and any relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Jan 27, 2025
1 parent 982ba73 commit 4b457c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/util/trivy/trivy.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,9 @@ func (c *Collector) scan(ctx context.Context, artifact artifact.Artifact, applie

trivyReport, err := s.ScanArtifact(ctx, types.ScanOptions{
ScanRemovedPackages: false,
PkgTypes: []types.PkgType{types.PkgTypeOS},
PkgRelationships: []ftypes.Relationship{
ftypes.RelationshipUnknown,
},
Scanners: types.Scanners{types.VulnerabilityScanner},
PkgTypes: []types.PkgType{types.PkgTypeOS, types.PkgTypeLibrary},
PkgRelationships: ftypes.Relationships,
Scanners: types.Scanners{types.VulnerabilityScanner},
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 4b457c9

Please sign in to comment.