Found during AI review of all workflows/actions.
Problems (all in .github/actions/sarif/action.yml)
- Lines 17-21 —
${{hashfiles('**/*.sarif')}} is evaluated when the step starts, i.e. before the rm -rf *.Tests.sarif on the previous line takes effect. If the only sarif files were test ones, SARIF_HASH is non-empty and the upload runs on an effectively empty set. hashfiles also matches relative to the workspace, not the step's working-directory: results/ — it works only by accident.
- Lines 27,36 —
continue-on-error: true on the upload and summary steps: SARIF upload failures (auth, quota, malformed) pass silently and code-scanning results just stop appearing with a green build. Line 40 then prints a possibly-empty sarif-id.
- Lines 3-4 — description is "Builds and deploys the source" (copy-paste); line 21 has unquoted
>> $GITHUB_ENV.
Plan
- Split delete and hash into separate steps, or compute presence in bash (
find . -name '*.sarif' ! -name '*.Tests.sarif' | head -1).
- Remove blanket
continue-on-error; if forks/private repos legitimately cannot upload, gate on an explicit condition instead.
- Fix description; quote the redirect; pass sarif-id via env: (covered by the injection round-2 issue too).
Found during AI review of all workflows/actions.
Problems (all in .github/actions/sarif/action.yml)
${{hashfiles('**/*.sarif')}}is evaluated when the step starts, i.e. before therm -rf *.Tests.sarifon the previous line takes effect. If the only sarif files were test ones, SARIF_HASH is non-empty and the upload runs on an effectively empty set. hashfiles also matches relative to the workspace, not the step'sworking-directory: results/— it works only by accident.continue-on-error: trueon the upload and summary steps: SARIF upload failures (auth, quota, malformed) pass silently and code-scanning results just stop appearing with a green build. Line 40 then prints a possibly-empty sarif-id.>> $GITHUB_ENV.Plan
find . -name '*.sarif' ! -name '*.Tests.sarif' | head -1).continue-on-error; if forks/private repos legitimately cannot upload, gate on an explicit condition instead.