Skip to content

Commit

Permalink
feat(template) Add misconfigurations to junit report (aquasecurity#1724)
Browse files Browse the repository at this point in the history
Co-authored-by: oranmoshai <[email protected]>
  • Loading branch information
oranmoshai and oranmoshai authored Feb 20, 2022
1 parent 219b71b commit 89b8d7f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contrib/junit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,18 @@
</testcase>
{{- end }}
</testsuite>
{{- $failures := len .Misconfigurations }}
<testsuite tests="{{ $failures }}" failures="{{ $failures }}" name="{{ .Target }}" errors="0" skipped="0" time="">
{{- if not (eq .Type "") }}
<properties>
<property name="type" value="{{ .Type }}"></property>
</properties>
{{- end -}}
{{ range .Misconfigurations }}
<testcase classname="{{ .Type }}" name="[{{ .Severity }}] {{ .ID }}" time="">
<failure message="{{ escapeXML .Title }}" type="description">{{ escapeXML .Description }}</failure>
</testcase>
{{- end }}
</testsuite>
{{- end }}
</testsuites>

0 comments on commit 89b8d7f

Please sign in to comment.