Skip to content

Commit

Permalink
feat: added misconfiguration field for html.tpl (#1444)
Browse files Browse the repository at this point in the history
* feat: added misconfiguration field for html.tpl

* feat: added message field for html.tpl

* fix: fixed integration test error
  • Loading branch information
DmitriyLewen committed Dec 20, 2021
1 parent 8e57dee commit d5269da
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions contrib/html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,31 @@
</tr>
{{- end }}
{{- end }}
{{- if (eq (len .Misconfigurations ) 0) }}
<tr><th colspan="6">No Misconfigurations found</th></tr>
{{- else }}
<tr class="sub-header">
<th>Type</th>
<th>Misconf ID</th>
<th>Check</th>
<th>Severity</th>
<th>Message</th>
</tr>
{{- range .Misconfigurations }}
<tr class="severity-{{ escapeXML .Severity }}">
<td class="misconf-type">{{ escapeXML .Type }}</td>
<td>{{ escapeXML .ID }}</td>
<td class="misconf-check">{{ escapeXML .Title }}</td>
<td class="severity">{{ escapeXML .Severity }}</td>
<td class="link" data-more-links="off" style="white-space:normal;"">
{{ escapeXML .Message }}
<br>
<a href={{ escapeXML .PrimaryURL | printf "%q" }}>{{ escapeXML .PrimaryURL }}</a>
</br>
</td>
</tr>
{{- end }}
{{- end }}
{{- end }}
</table>
{{- else }}
Expand Down
1 change: 1 addition & 0 deletions integration/testdata/alpine-310.html.golden
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
<a href="https://www.openssl.org/news/secadv/20190910.txt">https://www.openssl.org/news/secadv/20190910.txt</a>
</td>
</tr>
<tr><th colspan="6">No Misconfigurations found</th></tr>
</table>
</body>
</html>

0 comments on commit d5269da

Please sign in to comment.