From a27f879092d5e3f3dd08efd2b68666633416d0bd Mon Sep 17 00:00:00 2001 From: DmitriyLewen Date: Fri, 17 Jan 2025 14:38:38 +0600 Subject: [PATCH] feat: add logs about `-` and `0` in summary table --- pkg/report/table/table.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/report/table/table.go b/pkg/report/table/table.go index a4aeac332266..8b1b7804563b 100644 --- a/pkg/report/table/table.go +++ b/pkg/report/table/table.go @@ -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" @@ -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, "\nReport Summary\n\n"); err != nil { return err