From 16ebdcd0be71fcdb2b457a139fe875e8f3db9c07 Mon Sep 17 00:00:00 2001 From: mw Date: Fri, 22 Nov 2024 14:03:00 +0100 Subject: [PATCH] fix(ci): add last missing license, exclude private or blocked images --- .github/scripts/scan-for-licenses.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/scan-for-licenses.sh b/.github/scripts/scan-for-licenses.sh index c42a6ce5a..bad78f2e4 100755 --- a/.github/scripts/scan-for-licenses.sh +++ b/.github/scripts/scan-for-licenses.sh @@ -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" @@ -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 |