Skip to content

Commit

Permalink
feat: add logs about - and 0 in summary table
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Jan 17, 2025
1 parent 19fc0fe commit a27f879
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/report/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"slices"
"strings"

"github.com/aquasecurity/trivy/pkg/log"
"github.com/fatih/color"
"github.com/samber/lo"
"golang.org/x/xerrors"
Expand Down Expand Up @@ -80,6 +81,9 @@ func (tw Writer) Write(_ context.Context, report types.Report) error {
}

func (tw Writer) renderSummary(report types.Report) error {
log.WithPrefix("report").Info("Report Summary table contains special symbols",
log.String("'-'", "Target didn't scanned"),
log.String("'0'", "Target scanned, but didn't contain vulns/misconfigs/secrets/licenses"))
// Fprintln has a bug
if err := tml.Fprintf(tw.Output, "\n<underline><bold>Report Summary</bold></underline>\n\n"); err != nil {
return err
Expand Down

0 comments on commit a27f879

Please sign in to comment.