Update trivy template
This commit is contained in:
parent
0c3f7306d9
commit
ab2f4423a1
@ -42,7 +42,6 @@ RUN sed -i -e 's/exec \$JAVA_BIN/podman system service -t0\&\n exec \$JAV
|
||||
ENV XDG_RUNTIME_DIR=/home/$BUILDUSER/agent/xdg-run
|
||||
ENV BUILDAH_ISOLATION=chroot
|
||||
ENV _CONTAINERS_USERNS_CONFIGURED=""
|
||||
ENV TRIVY_TEMPLATE="@/home/jenkins/html.tpl"
|
||||
ENV HOME=/home/$BUILDUSER
|
||||
|
||||
USER $BUILDUSER
|
||||
|
32
html.tpl
32
html.tpl
@ -83,11 +83,13 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1><img src="https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png" style="padding-right:10px";>
|
||||
Trivy Report - {{ now | date "2006-01-02 15:04:05 -0700" }}</h1>
|
||||
<table>
|
||||
<tr><td colspan="7">
|
||||
<h1><img src="https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png" style="padding:10px;float:left";>
|
||||
{{- escapeXML ( index . 0 ).Target }}<br/>Trivy Report - {{ now | date "2006-01-02 15:04:05 -0700" }}</h1>
|
||||
</td></tr>
|
||||
{{- range . }}
|
||||
<tr class="group-header"><th colspan="7">{{ escapeXML .Target }}({{ escapeXML .Type }})</th></tr>
|
||||
<tr class="group-header"><th colspan="7">{{ escapeXML .Target }} ({{ .Type | toString | escapeXML }})</th></tr>
|
||||
{{- if (eq (len .Vulnerabilities) 0) }}
|
||||
<tr><th colspan="7">No Vulnerabilities found</th></tr>
|
||||
{{- else }}
|
||||
@ -101,10 +103,10 @@
|
||||
<th>Links</th>
|
||||
</tr>
|
||||
{{- range .Vulnerabilities }}
|
||||
<tr class="severity-{{ escapeXML .Vulnerability.Severity }}">
|
||||
<tr class="severity-{{ escapeXML .Severity }}">
|
||||
<td class="pkg-name">{{ escapeXML .PkgName }}</td>
|
||||
<td>{{ escapeXML .VulnerabilityID }}</td>
|
||||
<td class="severity">{{ escapeXML .Vulnerability.Severity }}</td>
|
||||
<td class="severity">{{ escapeXML .Severity }}</td>
|
||||
<td class="pkg-version">{{ escapeXML .InstalledVersion }}</td>
|
||||
<td>{{ escapeXML .FixedVersion }}</td>
|
||||
<td>{{ escapeXML .Title }}</td>
|
||||
@ -145,6 +147,26 @@
|
||||
</tr>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if (eq (len .Secrets) 0) }}
|
||||
<tr><th colspan="7">No Secrets found</th></tr>
|
||||
{{- else }}
|
||||
<tr class="sub-header">
|
||||
<th colspan="2">Rule ID</th>
|
||||
<th>Severity</th>
|
||||
<th>Category</th>
|
||||
<th colspan="2">Title</th>
|
||||
<th>Lines</th>
|
||||
</tr>
|
||||
{{- range .Secrets }}
|
||||
<tr class="severity-{{ escapeXML .Severity }}">
|
||||
<td colspan="2">{{ escapeXML .RuleID }}</td>
|
||||
<td class="severity">{{ escapeXML .Severity }}</td>
|
||||
<td>{{ .Category | toString | escapeXML }}</td>
|
||||
<td colspan="2">{{ escapeXML .Title }}</td>
|
||||
<td>{{ .StartLine | toString }} - {{ .EndLine | toString }}</td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</table>
|
||||
{{- else }}
|
||||
|
Loading…
Reference in New Issue
Block a user