chore(k8s): update comments with deprecated command format (#8964)

This commit is contained in:
afdesk
2025-06-03 12:54:45 +06:00
committed by GitHub
parent 14d2b83d4b
commit 521be3a178

View File

@@ -133,16 +133,11 @@ func (r *runner) run(ctx context.Context, artifacts []*k8sArtifacts.Artifact) er
// even though the default value of "--report" is "all". // even though the default value of "--report" is "all".
// //
// e.g. // e.g.
// $ trivy k8s --report all cluster // $ trivy k8s --report all
// $ trivy k8s --report all all
// //
// Or they can use "--format json" with implicit "--report all". // Or they can use "--format json" with implicit "--report all".
// //
// e.g. $ trivy k8s --format json cluster // All the results are shown in JSON // e.g. $ trivy k8s --format json // All the results are shown in JSON
//
// Single resource scanning is allowed with implicit "--report all".
//
// e.g. $ trivy k8s pod myapp
func validateReportArguments(opts flag.Options) error { func validateReportArguments(opts flag.Options) error {
if opts.ReportFormat == "all" && if opts.ReportFormat == "all" &&
!viper.IsSet("report") && !viper.IsSet("report") &&