mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 23:00:42 -08:00
fix: disable jar analyzer for scanners other than vuln (#3810)
This commit is contained in:
@@ -498,8 +498,7 @@ func disabledAnalyzers(opts flag.Options) []analyzer.Type {
|
||||
// But we don't create client if vulnerability analysis is disabled and SBOM format is not used
|
||||
// We need to disable jar analyzer to avoid errors
|
||||
// TODO disable all languages that don't contain license information for this case
|
||||
if opts.Scanners.Enabled(types.LicenseScanner) && !opts.Scanners.Enabled(types.VulnerabilityScanner) &&
|
||||
!slices.Contains(report.SupportedSBOMFormats, opts.Format) {
|
||||
if !opts.Scanners.Enabled(types.VulnerabilityScanner) && !slices.Contains(report.SupportedSBOMFormats, opts.Format) {
|
||||
analyzers = append(analyzers, analyzer.TypeJar)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user