Public Access
generated from Philipp/template-git
feat: initial commit of cve-differential action
This commit is contained in:
commit
bf996103f5
7 files changed
+651
No files matched your search
@@ -0,0 +1,67 @@
|
||||
### 🛡️ Security Scan Report
|
||||
|
||||
{{- range . }}
|
||||
{{- $targetName := .Target }}
|
||||
{{- if eq $targetName "" }}
|
||||
{{- if eq .Type "gobinary" }}
|
||||
{{- $targetName = "Go binary" }}
|
||||
{{- else if .Type }}
|
||||
{{- $targetName = .Type }}
|
||||
{{- else if .Class }}
|
||||
{{- $targetName = .Class }}
|
||||
{{- else }}
|
||||
{{- $targetName = "Application / Package" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $hasFindings := false }}
|
||||
|
||||
{{- if .Vulnerabilities }}
|
||||
{{- $hasFindings = true }}
|
||||
#### Target: `{{ $targetName }}` (Vulnerabilities)
|
||||
|
||||
| Severity | CVE | Package | Installed | Fixed In | Title |
|
||||
| :--- | :--- | :--- | :--- | :--- | :--- |
|
||||
{{- $vulns := .Vulnerabilities }}
|
||||
{{- range $sev := list "CRITICAL" "HIGH" "MEDIUM" "LOW" "UNKNOWN" }}
|
||||
{{- range $vuln := $vulns }}
|
||||
{{- if eq $vuln.Severity $sev }}
|
||||
| {{ if eq $vuln.Severity "CRITICAL" }}🔴 CRITICAL{{ else if eq $vuln.Severity "HIGH" }}🟠 HIGH{{ else if eq $vuln.Severity "MEDIUM" }}🟡 MEDIUM{{ else if eq $vuln.Severity "LOW" }}🔵 LOW{{ else }}⚪ {{ $vuln.Severity }}{{ end }} | [{{ $vuln.VulnerabilityID }}]({{ $vuln.PrimaryURL }}) | `{{ $vuln.PkgName }}` | {{ $vuln.InstalledVersion }} | {{ default "-" $vuln.FixedVersion }} | {{ $vuln.Title }} |
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Misconfigurations }}
|
||||
{{- $hasFindings = true }}
|
||||
#### Target: `{{ $targetName }}` (Misconfigurations)
|
||||
|
||||
| Severity | Rule ID | Title | Message | Resolution |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
{{- $misconfs := .Misconfigurations }}
|
||||
{{- range $sev := list "CRITICAL" "HIGH" "MEDIUM" "LOW" "UNKNOWN" }}
|
||||
{{- range $m := $misconfs }}
|
||||
{{- if eq $m.Severity $sev }}
|
||||
| {{ if eq $m.Severity "CRITICAL" }}🔴 CRITICAL{{ else if eq $m.Severity "HIGH" }}🟠 HIGH{{ else if eq $m.Severity "MEDIUM" }}🟡 MEDIUM{{ else if eq $m.Severity "LOW" }}🔵 LOW{{ else }}⚪ {{ $m.Severity }}{{ end }} | [{{ $m.ID }}]({{ $m.PrimaryURL }}) | {{ $m.Title }} | {{ $m.Message }} | {{ default "-" $m.Resolution }} |
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Secrets }}
|
||||
{{- $hasFindings = true }}
|
||||
#### Target: `{{ $targetName }}` (Secrets)
|
||||
|
||||
| Severity | Rule ID | Title | Lines |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
{{- range .Secrets }}
|
||||
| {{ if eq .Severity "CRITICAL" }}🔴 CRITICAL{{ else if eq .Severity "HIGH" }}🟠 HIGH{{ else if eq .Severity "MEDIUM" }}🟡 MEDIUM{{ else if eq .Severity "LOW" }}🔵 LOW{{ else }}⚪ {{ .Severity }}{{ end }} | {{ .RuleID }} | {{ .Title }} | L{{ .StartLine }}-L{{ .EndLine }} |
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if not $hasFindings }}
|
||||
#### Target: `{{ $targetName }}`
|
||||
✅ No security issues found.
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user