Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/k8s/commands/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
if err := validateReportArguments(opts); err != nil {
return err
}
// Override report=all to summary if compliance flag is specified
if opts.Compliance.Spec.ID != "" && opts.ReportFormat == "all" {
log.WarnContext(ctx, `Compliance based results only have summary styled output.

Check failure on line 26 in pkg/k8s/commands/cluster.go

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

File is not properly formatted (gci)
Example of correct usage: trivy k8s --report summary --compliance k8s-cis-1.23 --format table`)
opts.ReportFormat = "summary"
}
var artifacts []*k8sArtifacts.Artifact
var err error
switch opts.Format {
Expand Down
Loading