From df88c34cea47b600a22c66621e1aa1580976f5aa Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Tue, 3 Sep 2024 15:53:03 +0200 Subject: [PATCH] chore(ci): simplify check --- .github/scripts/generate-sarif-reports.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/generate-sarif-reports.sh b/.github/scripts/generate-sarif-reports.sh index e79aec4769..a97f2a10f9 100755 --- a/.github/scripts/generate-sarif-reports.sh +++ b/.github/scripts/generate-sarif-reports.sh @@ -20,7 +20,7 @@ function createSarifReports() { # shellcheck disable=SC2046 yq -r '.annotations["artifacthub.io/images"]' "$chart/Chart.yaml" | yq -r '.[] | .image' | - parallel $([[ -v GITHUB_JOB ]] || echo --bar) --retries 3 -P 0 -k generateSarifReport "$chart" "{}" "reports/$chartName-{#}.json" + parallel ${GITHUB_JOB+--bar} --retries 3 -P 0 -k generateSarifReport "$chart" "{}" "reports/$chartName-{#}.json" # shellcheck disable=SC1009 cat "reports/$chartName-"*.json | jq -r -s '{"$schema": .[0]["$schema"], version: .[0].version, runs: [reduce map(.runs[])[] as $run (null; .+$run as $new | .tool.driver.rules |= (.+$run.tool.driver.rules|unique_by(.id)) | $new*. | .results += ($run.results | map(.locations |= (([.[] | select(.physicalLocation)][0].physicalLocation.artifactLocation) as $physicalLocation | .[] | select(.logicalLocations)[] | map({physicalLocation:{artifactLocation:{uri:"\(.fullyQualifiedName)/\($run.properties.imageName)/\($run.originalUriBaseIds[$physicalLocation.uriBaseId].uri)\($physicalLocation.uri)"}}})))) | del(.properties, .originalUriBaseIds))]}' >"reports/$chartName.json.sarif" }