Created
October 7, 2024 09:05
-
-
Save dirsigler/94203bde437583d7aa6fce89e677f826 to your computer and use it in GitHub Desktop.
Trivy Template to support Markdown reports for License scans
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- if . }} | |
{{- range . }} | |
{{- if gt (len .Licenses) 0 }} | |
### Target: `{{ .Target }}` | |
#### Licenses Detected ({{ len .Licenses }}) | |
| File Path | License Name | Severity | Confidence | Link | | |
|-----------|--------------|----------|------------|------| | |
{{- range .Licenses }} | |
| `{{ escapeXML .FilePath }}` | `{{ escapeXML .Name }}` | {{ escapeXML .Severity }} | {{ printf "%.2f" .Confidence }} | [Link]({{ escapeXML .Link }}) | | |
{{- end }} | |
{{- end }} | |
{{- end }} | |
{{- else }} | |
### Trivy Returned an Empty Report | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment