feat: sunc contrib templates for Trivy from 0.53 release
This commit is contained in:
parent
16dcaef4f7
commit
a165073521
10
junit.tpl
10
junit.tpl
@ -14,8 +14,12 @@
|
|||||||
</testcase>
|
</testcase>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</testsuite>
|
</testsuite>
|
||||||
{{- $failures := len .Misconfigurations }}
|
|
||||||
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
|
{{- if .MisconfSummary }}
|
||||||
|
<testsuite tests="{{ add .MisconfSummary.Successes .MisconfSummary.Failures }}" failures="{{ .MisconfSummary.Failures }}" name="{{ .Target }}" errors="0" skipped="{{ .MisconfSummary.Exceptions }}" time="">
|
||||||
|
{{- else }}
|
||||||
|
<testsuite tests="0" failures="0" name="{{ .Target }}" errors="0" skipped="0" time="">
|
||||||
|
{{- end }}
|
||||||
{{- if not (eq .Type "") }}
|
{{- if not (eq .Type "") }}
|
||||||
<properties>
|
<properties>
|
||||||
<property name="type" value="{{ .Type }}"></property>
|
<property name="type" value="{{ .Type }}"></property>
|
||||||
@ -23,7 +27,9 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range .Misconfigurations }}
|
{{ range .Misconfigurations }}
|
||||||
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
|
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
|
||||||
|
{{- if (eq .Status "FAIL") }}
|
||||||
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
|
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
|
||||||
|
{{- end }}
|
||||||
</testcase>
|
</testcase>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
Loading…
Reference in New Issue
Block a user