mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix(gitlab): fix json generation on loop (#409)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
{
|
||||
"version": "2.3",
|
||||
"vulnerabilities": [
|
||||
{{- $first := true }}
|
||||
{{- $t_first := true }}
|
||||
{{- range . }}
|
||||
{{- $target := .Target }}
|
||||
{{- range .Vulnerabilities -}}
|
||||
{{- if $first -}}
|
||||
{{- $first = false -}}
|
||||
{{- if $t_first -}}
|
||||
{{- $t_first = false -}}
|
||||
{{ else -}}
|
||||
,
|
||||
{{- end }}
|
||||
@@ -60,10 +60,10 @@
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{{- $first := true -}}
|
||||
{{- $l_first := true -}}
|
||||
{{- range .References -}}
|
||||
{{- if $first -}}
|
||||
{{- $first = false }}
|
||||
{{- if $l_first -}}
|
||||
{{- $l_first = false }}
|
||||
{{- else -}}
|
||||
,
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user