diff --git a/pkg/commands/artifact/run.go b/pkg/commands/artifact/run.go index 5c32c6d2b2..0e1158e315 100644 --- a/pkg/commands/artifact/run.go +++ b/pkg/commands/artifact/run.go @@ -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) }