Omit Remediation if PrimaryURL is empty (#2006)

This commit is contained in:
Ben Harvey
2022-06-19 08:16:08 -04:00
committed by GitHub
parent 396e404eeb
commit 6f1035269d

View File

@@ -35,12 +35,14 @@
},
"Title": "Trivy found a vulnerability to {{ .VulnerabilityID }} in container {{ $target }}",
"Description": {{ escapeString $description | printf "%q" }},
{{ if not (empty .PrimaryURL) -}}
"Remediation": {
"Recommendation": {
"Text": "More information on this vulnerability is provided in the hyperlink",
"Url": "{{ .PrimaryURL }}"
}
},
{{ end -}}
"ProductFields": { "Product Name": "Trivy" },
"Resources": [
{