Skip to content

Commit

Permalink
chore: show a deprecation notice for --scanners config (#5587)
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
knqyf263 authored Nov 15, 2023
1 parent f4dd062 commit a389529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/flag/scan_flags.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package flag

import (
"github.com/aquasecurity/trivy/pkg/log"
"github.com/aquasecurity/trivy/pkg/types"
xstrings "github.com/aquasecurity/trivy/pkg/x/strings"
)
Expand Down Expand Up @@ -41,7 +42,10 @@ var (
switch s {
case "vulnerability":
return string(types.VulnerabilityScanner)
case "config", "misconf", "misconfiguration":
case "misconf", "misconfiguration":
return string(types.MisconfigScanner)
case "config":
log.Logger.Warn("'--scanner config' is deprecated. Use '--scanner misconfig' instead. See https://github.com/aquasecurity/trivy/discussions/5586 for the detail.")
return string(types.MisconfigScanner)
}
return s
Expand Down

0 comments on commit a389529

Please sign in to comment.