mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
23 lines
876 B
Text
23 lines
876 B
Text
Results:
|
|
{{range $filePath,$fileErrors := .Errors}}
|
|
Golang errors in file: [{{ $filePath }}]:
|
|
{{range $index, $error := $fileErrors}}
|
|
> [line {{$error.Line}} : column {{$error.Column}}] - {{$error.Err}}
|
|
{{end}}
|
|
{{end}}
|
|
{{ range $index, $issue := .Issues }}
|
|
[{{ 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 }}
|
|
|
|
{{ end }}
|
|
{{ notice "Summary:" }}
|
|
Gosec : {{.GosecVersion}}
|
|
Files : {{.Stats.NumFiles}}
|
|
Lines : {{.Stats.NumLines}}
|
|
Nosec : {{.Stats.NumNosec}}
|
|
Issues : {{ if eq .Stats.NumFound 0 }}
|
|
{{- success .Stats.NumFound }}
|
|
{{- else }}
|
|
{{- danger .Stats.NumFound }}
|
|
{{- end }}
|
|
|