Last active
January 14, 2022 14:51
-
-
Save wagoodman/85ffcbf6f73a9597f657f17936a8da0e to your computer and use it in GitHub Desktop.
grype html template usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> | |
<style> | |
.backdrop { | |
background: #efefef; | |
} | |
.center { | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.vuln-table { | |
border-collapse: collapse; | |
margin-top: 50px; | |
padding: 25px | |
font-size: 0.9em; | |
font-family: sans-serif; | |
min-width: 400px; | |
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); | |
} | |
.vuln-table thead tr { | |
background-color: #4062f7; | |
color: #ffffff; | |
text-align: left; | |
} | |
.vuln-table th, | |
.vuln-table td { | |
padding: 12px 15px; | |
} | |
.vuln-table tbody tr { | |
border-bottom: 1px solid #dddddd; | |
} | |
.vuln-table tbody tr:nth-of-type(even) { | |
background-color: #f3f3f3; | |
} | |
.vuln-table tbody tr:last-of-type { | |
border-bottom: 2px solid #4062f7; | |
} | |
.vuln-table tbody tr.active-row { | |
font-weight: bold; | |
color: #4062f7; | |
} | |
</style> | |
<body class="backdrop"> | |
<table class="vuln-table center sortable"> | |
<thead> | |
<tr> | |
<th>Package Name</th> | |
<th>Package Version</th> | |
<th>Vulnerability</th> | |
<th>Severity</th> | |
</tr> | |
</thead> | |
<tbody> | |
{{- range .Matches}} | |
<tr class="item"> | |
<td>{{.Artifact.Name}}</td> | |
<td>{{.Artifact.Version}}</td> | |
<td>{{.Vulnerability.ID}}</td> | |
<td>{{.Vulnerability.Severity}}</td> | |
</tr> | |
{{- end}} | |
</tbody> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage: