diff --git a/.github/workflows/trivy-images.yml b/.github/workflows/trivy-images.yml index 3970fce36..5304f0643 100644 --- a/.github/workflows/trivy-images.yml +++ b/.github/workflows/trivy-images.yml @@ -135,6 +135,15 @@ jobs: out.close() PY + - name: Give the image scans their own tool name + # Code scanning reports missing configurations per tool, and only this nightly + # can produce these categories — keep them off the Trivy check PRs see (#2266). + if: ${{ always() && hashFiles('trivy-image.sarif') != '' }} + run: | + set -euo pipefail + jq '.runs[].tool.driver.name = "Trivy Images"' trivy-image.sarif > renamed.sarif + mv renamed.sarif trivy-image.sarif + - name: Upload SARIF to GitHub Code Scanning # Guard: a failed pull must not also report a missing SARIF. if: ${{ always() && hashFiles('trivy-image.sarif') != '' }}