2021-11-15 15:17:22 +00:00
|
|
|
Results:
|
2021-05-06 08:31:51 +01:00
|
|
|
{{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 }}
|
2022-08-20 11:50:34 +01:00
|
|
|
[{{ 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 }})
|
2021-05-06 08:31:51 +01:00
|
|
|
{{ printCode $issue }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
{{ notice "Summary:" }}
|
2021-05-21 10:14:43 +01:00
|
|
|
Gosec : {{.GosecVersion}}
|
|
|
|
Files : {{.Stats.NumFiles}}
|
|
|
|
Lines : {{.Stats.NumLines}}
|
|
|
|
Nosec : {{.Stats.NumNosec}}
|
|
|
|
Issues : {{ if eq .Stats.NumFound 0 }}
|
2021-05-06 08:31:51 +01:00
|
|
|
{{- success .Stats.NumFound }}
|
|
|
|
{{- else }}
|
|
|
|
{{- danger .Stats.NumFound }}
|
|
|
|
{{- end }}
|
|
|
|
|