diff --git a/contrib/junit.tpl b/contrib/junit.tpl index b351f62bb4..e4313c124f 100644 --- a/contrib/junit.tpl +++ b/contrib/junit.tpl @@ -15,6 +15,7 @@ {{- end }} +{{- $target := .Target }} {{- if .MisconfSummary }} {{- else }} @@ -28,7 +29,23 @@ {{ range .Misconfigurations }} {{- if (eq .Status "FAIL") }} - {{ escapeXML .Description }} + + {{- $target }}: + {{- with .CauseMetadata }} + {{- .StartLine }} + {{- if lt .StartLine .EndLine }}:{{ .EndLine }}{{ end }}: Occurrences: + {{- range $i := .Occurrences -}} + via {{ .Filename }}: + {{- .Location.StartLine }} + {{- if lt .Location.StartLine .Location.EndLine }}:{{ .Location.EndLine }}{{ end }} ({{ .Resource }}) + {{- end -}} + Code: + {{- range .Code.Lines }} + {{- if .IsCause }}{{ escapeXML .Content }} {{- end }} + {{- end }} + {{- end }} + {{- escapeXML .Description }} + {{- end }} {{- end }}