commit 106f71871350bd2ec5f0c9e072cb6c1a7bed07fe parent 8dc65b4eb4244561171b08f871dc7ce67c368f7d Author: MTRNord <MTRNord@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:22:49 +0100 try to fix workflow Signed-off-by: MTRNord <MTRNord@users.noreply.github.com> Diffstat:
| M | .github/workflows/validate.yaml | | | 21 | +++++++++++++++++++++ |
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml @@ -167,6 +167,27 @@ jobs: verbose: true outputFile: results.sarif + - name: Fix Kubescape SARIF artifact locations + if: always() + run: | + if [ -f results.sarif ]; then + jq ' + .runs[].results[] |= ( + if .locations then + .locations[] |= ( + if .physicalLocation then + .physicalLocation.artifactLocation.uri //= "unknown" + else + .physicalLocation = {"artifactLocation": {"uri": "unknown"}} + end + ) + else + .locations = [{"physicalLocation": {"artifactLocation": {"uri": "unknown"}}}] + end + ) + ' results.sarif > results-fixed.sarif && mv results-fixed.sarif results.sarif + fi + - name: Upload Kubescape results to GitHub Security uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4 if: always()