mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 23:00:42 -08:00
Disable library analyzer for OS only scan type (#1191)
This commit is contained in:
committed by
GitHub
parent
5750cc2e1a
commit
9027dc3252
@@ -157,6 +157,11 @@ func scan(ctx context.Context, opt Option, initializeScanner InitializeScanner,
|
||||
disabledAnalyzers = []analyzer.Type{}
|
||||
}
|
||||
|
||||
// Don't analyze programming language packages when not running in 'library' mode
|
||||
if !utils.StringInSlice(types.VulnTypeLibrary, opt.VulnType) {
|
||||
disabledAnalyzers = append(disabledAnalyzers, analyzer.TypeLanguages...)
|
||||
}
|
||||
|
||||
// ScannerOptions is filled only when config scanning is enabled.
|
||||
var configScannerOptions config.ScannerOption
|
||||
if utils.StringInSlice(types.SecurityCheckConfig, opt.SecurityChecks) {
|
||||
|
||||
Reference in New Issue
Block a user