Skip to content

Commit 7694df1

Browse files
authored
fix(sbom): skip executable file analysis if Rekor isn't a specified SBOM source (aquasecurity#6163)
1 parent 74dc5b6 commit 7694df1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/commands/artifact/run.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ func disabledAnalyzers(opts flag.Options) []analyzer.Type {
514514
analyzers = append(analyzers, analyzer.TypeHistoryDockerfile)
515515
}
516516

517-
if len(opts.SBOMSources) == 0 {
517+
// Skip executable file analysis if Rekor isn't a specified SBOM source.
518+
if !slices.Contains(opts.SBOMSources, types.SBOMSourceRekor) {
518519
analyzers = append(analyzers, analyzer.TypeExecutable)
519520
}
520521

0 commit comments

Comments
 (0)