Created
January 25, 2024 08:00
-
-
Save antlas0/1e30b228d3e5f21a60eb5e8b098a723c to your computer and use it in GitHub Desktop.
Trivy template files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- $critical := 0 }} | |
{{- $high := 0 }} | |
{{- $medium := 0 }} | |
{{- $low := 0 }} | |
{{- range . }} | |
{{- range .Vulnerabilities }} | |
{{- if eq .Severity "CRITICAL" }}{{- $critical = add $critical 1 }}{{- end }} | |
{{- if eq .Severity "HIGH" }}{{- $high = add $high 1 }}{{- end }} | |
{{- if eq .Severity "MEDIUM" }}{{- $medium = add $medium 1 }}{{- end }} | |
{{- if eq .Severity "LOW" }}{{- $low = add $low 1 }}{{- end }} | |
{{- end }} | |
{{- end }} | |
critical, high, medium, low | |
{{ $critical }}, {{ $high }}, {{ $medium }}, {{ $low }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment