-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
It would be helpful to support the template format. I would particularly like to be able to see the vulnerability location and CVE in the output. Locally I can achieve this with the following template:
"Package","Version Installed","Vulnerability ID","Severity","Locations"
{{- range .Matches}}
"{{.Artifact.Name}}","{{.Artifact.Version}}","{{.Vulnerability.ID}}","{{.Vulnerability.Severity}}","{{ (index .Artifact.Locations 0).RealPath }}"
{{- end}}
which, with grype -o template -t ./csv.tmpl [IMAGE NAME], I can get an output like:
"Package","Version Installed","Vulnerability ID","Severity","Locations"
"apt","2.6.1","CVE-2011-3374","Negligible","/usr/share/doc/apt/copyright"
"binutils","2.40-2","CVE-2023-1972","Negligible","/usr/share/doc/binutils/copyright"
I'd be willing to create a PR if you are interested.
chiragjn and coalestcoilysiren
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
Type
Projects
Status
Ready