Scorecards workflow fails weekly on main (environment policy) and on tag pushes (publish rejection)
Problem
The Scorecards workflow (.github/workflows/scorecards.yaml) fails on every scheduled run on main since mid-July, and on every release-tag push. Two distinct failure modes:
1. Scheduled runs on main never start the analysis — the run fails at job setup with:
Branch "main" is not allowed to deploy to scorecard due to environment protection rules.
The deployment was rejected or didn't satisfy other protection rules.(e.g. scheduled run 35546672982, 2026-09-21, and every Monday run since 2026-07-16)
The workflow's own comment notes the scorecard environment's deployment branch/tag policy must match the trigger pattern — it currently allows only tags v*, so the weekly schedule trigger on main is rejected by the environment gate. Tag-push runs pass the gate but then fail with:
2. Tag runs fail inside the analysis — ##[error]Only the default branch main is supported. (scorecard results publishing only supports the default branch), e.g. run for v0.119.0, 2026-09-17. With the pinned ossf/scorecard-action@4eaacf05 (v2.4.3), a rejected results POST fails the whole action.
Suggested fix
- Add branch
mainto thescorecardenvironment's deployment branch/tag policy (repo settings), so the weekly cron can run — this is the piece that can't be changed via PR. - Optionally bump
ossf/scorecard-actionto v2.4.4, which changes results-POST failures from fatal to logged ("log POST failures instead of failing entire action"), so tag-push runs no longer go red on the non-default-branch publish rejection.
Happy to send the action-bump PR if wanted — the environment policy change needs a repo admin.
Source: anchore/grype