mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
fix(sbom): skip executable file analysis if Rekor isn't a specified SBOM source (#6163)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user