Skip to content

Instantly share code, notes, and snippets.

@itaysk
Last active January 3, 2024 13:09
Show Gist options
  • Save itaysk/4299a8354c6c91a76487f952b07fa364 to your computer and use it in GitHub Desktop.
Save itaysk/4299a8354c6c91a76487f952b07fa364 to your computer and use it in GitHub Desktop.
License report from Trivy full license scan
[.Results[] | .Licenses//empty | .[]] |
group_by(.Name) | .[] |
{"license":.[1].Name, "findings":map(if .PkgName=="" then .FilePath else .PkgName end)}
trivy fs . --scanners license --license-full --format json | jq '[.Results[] | .Licenses//empty | .[]] | group_by(.Name) | .[] |{"license":.[1].Name, "findings":map(if .PkgName=="" then .FilePath else .PkgName end)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment