Skip to content

Commit

Permalink
fix(sbom): skip executable file analysis if Rekor isn't a specified S…
Browse files Browse the repository at this point in the history
…BOM source (#6163)
  • Loading branch information
otms61 authored Feb 20, 2024
1 parent 74dc5b6 commit 7694df1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/commands/artifact/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ func disabledAnalyzers(opts flag.Options) []analyzer.Type {
analyzers = append(analyzers, analyzer.TypeHistoryDockerfile)
}

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

Expand Down

0 comments on commit 7694df1

Please sign in to comment.