Skip to content

Commit

Permalink
fix(ci): add last missing license, exclude private or blocked images (#…
Browse files Browse the repository at this point in the history
…1254)

The teuto-k8s-worker is private, trivy is blocking pulls.
  • Loading branch information
marvinWolff authored Nov 22, 2024
1 parent dc06e17 commit c0ca8ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/scripts/scan-for-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ WHITELIST=(
"EPL-1.0"
"EPL-2.0"
"CPL-1.0"
"GPLv2"
"GPL-1.0"
"GPL-1.0-only"
"GPL-1.0-or-later"
Expand Down Expand Up @@ -64,6 +65,7 @@ function scanLicenses() {
local unacceptedLicenses=()
local unacceptedLicense
licenseMap="$(yq -r '.annotations["artifacthub.io/images"]' "$chart/Chart.yaml" | yq -r '.[] | .image' |
sed -e '/aquasecurity\/trivy-operator/d' -e '/teuto-portal-k8s-worker/d' |
parallel -k trivy image {} --severity HIGH,CRITICAL,MEDIUM -f json --scanners license --license-full --quiet |
jq -s -r "$licenseConversionJq")"
mapfile -t unacceptedLicenses < <(jq <<<"$licenseMap" -r --argjson acceptedLicenses "[\"$(echo -n "${WHITELIST[@]}" | tr " " \\n |
Expand Down

0 comments on commit c0ca8ca

Please sign in to comment.