Skip to content

Instantly share code, notes, and snippets.

@ckocyigit
Created April 9, 2024 13:39
Show Gist options
  • Select an option

  • Save ckocyigit/2e6f335a5fdb552bcf2ebba8e6ade58c to your computer and use it in GitHub Desktop.

Select an option

Save ckocyigit/2e6f335a5fdb552bcf2ebba8e6ade58c to your computer and use it in GitHub Desktop.
Trivy TSV Template
"Image" "Title" "Description" "Severity" "Vulnerability ID" "Vendor ID" "Package Class" "Package Type" "Package Name" "Installed Version" "Fixed Version" "Severity Source" "Primary Url" "Reference"
{{- range $ri, $r := . }}
{{- $imageName := $r.Target }}
{{- $pkgClass := $r.Class }}
{{- $pkgType := $r.Type }}
{{- range $vi, $v := .Vulnerabilities }}
{{$imageName}} {{ $v.Title }} {{ $v.Description }} {{$v.Severity}} {{ $v.VulnerabilityID }} {{$v.VendorIDs | join ", "}} {{ $pkgClass }} {{$pkgType}} {{ $v.PkgName }} {{$v.InstalledVersion }} {{ $v.FixedVersion }} {{$v.SeveritySource}} {{$v.PrimaryURL}} "{{$v.References | join "\r"}}"
{{- end}}
{{- end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment