mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
fix: handle nil CWE pointer in text template
This commit is contained in:
parent
79a5b13bdb
commit
074dc71087
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ Golang errors in file: [{{ $filePath }}]:
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ range $index, $issue := .Issues }}
|
{{ range $index, $issue := .Issues }}
|
||||||
[{{ highlight $issue.FileLocation $issue.Severity $issue.NoSec }}] - {{ $issue.RuleID }}{{ if $issue.NoSec }} ({{- success "NoSec" -}}){{ end }} ({{ $issue.Cwe.SprintID }}): {{ $issue.What }} (Confidence: {{ $issue.Confidence}}, Severity: {{ $issue.Severity }})
|
[{{ highlight $issue.FileLocation $issue.Severity $issue.NoSec }}] - {{ $issue.RuleID }}{{ if $issue.NoSec }} ({{- success "NoSec" -}}){{ end }} ({{ if $issue.Cwe }} {{ $issue.Cwe.SprintID }} {{ else }} "CWE" {{ end }}): {{ $issue.What }} (Confidence: {{ $issue.Confidence}}, Severity: {{ $issue.Severity }})
|
||||||
{{ printCode $issue }}
|
{{ printCode $issue }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue