From 006c6fa04075c8f269ade750116a4e17fc6da9d3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 20 May 2024 14:20:10 +0300 Subject: [PATCH] Fix table formatting for found vulnerabilities (#3369) Signed-off-by: Radoslav Dimitrov --- internal/engine/eval/vulncheck/report.go | 35 ++++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/internal/engine/eval/vulncheck/report.go b/internal/engine/eval/vulncheck/report.go index baecf7e32b..d2bc22ad3a 100644 --- a/internal/engine/eval/vulncheck/report.go +++ b/internal/engine/eval/vulncheck/report.go @@ -182,28 +182,27 @@ const (

Vulnerability scan of {{slice .Report.CommitSHA 0 8 }}:

    -
  • {{ .Symbols.bug }} vulnerable packages: {{ $vulnerabilityCount }}
  • -
  • {{ .Symbols.fix }} fixes available for: {{ $remediationCount }}
  • +
  • {{ .Symbols.bug }} vulnerable packages: {{ $vulnerabilityCount }}
  • +
  • {{ .Symbols.fix }} fixes available for: {{ $remediationCount }}
{{- if .Report.TrackedDependencies }} - - - - - - - - {{- range .Report.TrackedDependencies }} - - - - - - - - {{ end }} + + + + + + + + {{- range .Report.TrackedDependencies }} + + + + + + + {{- end }}
PackageVersion#Vulnerabilities#FixesPatch
{{.Dependency.Name}}{{.Dependency.Version}}{{len .Vulnerabilities}}{{ (call $countVulnsWithFix .Vulnerabilities) }}{{- if .PatchVersion }}{{.PatchVersion}}{{- else }}{{$warningSymbol}}{{- end }}
PackageVersion#Vulnerabilities#FixesPatch
{{.Dependency.Name}}{{.Dependency.Version}}{{len .Vulnerabilities}}{{ (call $countVulnsWithFix .Vulnerabilities) }}{{- if .PatchVersion }}{{.PatchVersion}}{{- else }}{{$warningSymbol}}{{- end }}
{{ end -}} `