fix: minor tweaks to Trivy report HTML template

This commit is contained in:
Stefan Reimer 2022-01-19 00:37:43 +01:00
parent b173aba103
commit 72d5c97032

View File

@ -19,7 +19,6 @@
table, th, td { table, th, td {
border: 1px solid black; border: 1px solid black;
border-collapse: collapse; border-collapse: collapse;
white-space: nowrap;
padding: .3em; padding: .3em;
} }
table { table {
@ -88,7 +87,7 @@
{{- range . }} {{- range . }}
<tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr> <tr class="group-header"><th colspan="6">{{ escapeXML .Type }}</th></tr>
{{- if (eq (len .Vulnerabilities) 0) }} {{- if (eq (len .Vulnerabilities) 0) }}
<tr><th colspan="6">No Vulnerabilities found</th></tr> <tr><th colspan="7">No Vulnerabilities found</th></tr>
{{- else }} {{- else }}
<tr class="sub-header"> <tr class="sub-header">
<th>Package</th> <th>Package</th>
@ -116,7 +115,7 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if (eq (len .Misconfigurations ) 0) }} {{- if (eq (len .Misconfigurations ) 0) }}
<tr><th colspan="6">No Misconfigurations found</th></tr> <tr><th colspan="7">No Misconfigurations found</th></tr>
{{- else }} {{- else }}
<tr class="sub-header"> <tr class="sub-header">
<th>Type</th> <th>Type</th>
@ -131,7 +130,7 @@
<td>{{ escapeXML .ID }}</td> <td>{{ escapeXML .ID }}</td>
<td class="misconf-check">{{ escapeXML .Title }}</td> <td class="misconf-check">{{ escapeXML .Title }}</td>
<td class="severity">{{ escapeXML .Severity }}</td> <td class="severity">{{ escapeXML .Severity }}</td>
<td class="link" data-more-links="off" style="white-space:normal;""> <td class="link" data-more-links="off" style="white-space:normal;">
{{ escapeXML .Message }} {{ escapeXML .Message }}
<br> <br>
<a href={{ escapeXML .PrimaryURL | printf "%q" }} target="_blank" rel="noopener noreferrer">{{ escapeXML .PrimaryURL }}</a> <a href={{ escapeXML .PrimaryURL | printf "%q" }} target="_blank" rel="noopener noreferrer">{{ escapeXML .PrimaryURL }}</a>