Skip to content

Commit

Permalink
fix(report): skip empty table for ignored misconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Jul 16, 2024
1 parent e60b582 commit 32e9311
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/report/table/misconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func NewMisconfigRenderer(result types.Result, severities []dbTypes.Severity, tr
}

func (r *misconfigRenderer) Render() string {
// Trivy doesn't currently support showing suppressed misconfigs
// So just skip this result
if r.result.MisconfSummary.Failures == 0 {
return ""
}
target := fmt.Sprintf("%s (%s)", r.result.Target, r.result.Type)
RenderTarget(r.w, target, r.ansi)

Expand Down

0 comments on commit 32e9311

Please sign in to comment.