File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 73
73
{{- /* TODO: Type not extractable - https://github.com/aquasecurity/trivy-db/pull/24 */} }
74
74
"type": "cve",
75
75
"name": "{ { .VulnerabilityID } }",
76
- "value": "{ { .VulnerabilityID } }",
76
+ "value": "{ { .VulnerabilityID } }"
77
+ { {- /* cf. https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/e3d280d7f0862ca66a1555ea8b24016a004bb914/dist/container-scanning-report-format.json#L157-179 */} }
78
+ { {- if .PrimaryURL | regexMatch " ^(https?|ftp)://.+" -} },
77
79
"url": "{ { .PrimaryURL } }"
80
+ { {- end } }
78
81
}
79
82
],
80
83
"links": [
85
88
{ {- else -} }
86
89
,
87
90
{ {- end -} }
91
+ { {- if . | regexMatch " ^(https?|ftp)://.+" -} }
88
92
{
89
- " url" : " {{ regexFind " [^ ]+ " . }}"
93
+ " url" : " {{ . }}"
90
94
}
95
+ { {- else -} }
96
+ { {- $l_first = true } }
97
+ { {- end -} }
91
98
{ {- end } }
92
99
]
93
100
}
You can’t perform that action at this time.
0 commit comments