Skip to content

fix(ci): grant actions: read at job level so OSSF Scorecard stops startup-failing - #160

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/scorecard-perm-escalation
Aug 7, 2026
Merged

fix(ci): grant actions: read at job level so OSSF Scorecard stops startup-failing#160
hyperpolymath merged 1 commit into
mainfrom
fix/scorecard-perm-escalation

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

OSSF Scorecard has been dying daily with a 0-second startup_failure, and it outlasted the lockfile repair in #158 — so it is a second, distinct cause.

Cause

A job-level permissions: block replaces the workflow-level one; it does not merge with it.

scorecard.yml grants actions: read at workflow level, but the job that calls the reusable re-declared only contents / security-events / id-token — dropping actions: read exactly where it is needed. The standards scorecard-reusable.yml requests actions: read at line 9, and a reusable asking for more than its caller grants is rejected before any job is created. That is why there was never a log, an annotation, or a check run to look at.

This matches the estate-wide reusable-permission-escalation pattern.

Verification

Canary dispatch on this branch (run 31175237558): 1 job ran where previously there were 0. The startup rejection is gone.

That job then fails with Only the default branch main is supported — which is the Scorecard action refusing to run on a non-default branch, i.e. an artefact of canarying on a branch, not a defect. It will run properly once this is on main.

🤖 Generated with Claude Code

…failing

OSSF Scorecard has been dying with a 0-second startup_failure daily,
outlasting the lockfile repair (#158) — a distinct second cause.

A job-level 'permissions:' block REPLACES the workflow-level one rather
than merging with it. scorecard.yml grants actions: read at workflow
level but the job calling the reusable re-declared only contents /
security-events / id-token, so actions: read was dropped exactly where
it is needed — the standards scorecard-reusable requests it at line 9.
A reusable asking for more than its caller grants is rejected before any
job is created, which is why no log or annotation ever appeared.

Matches the estate-wide reusable-perm-escalation pattern.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gitar-bot

This comment has been minimized.

@gitar-bot
gitar-bot Bot enabled auto-merge (squash) August 7, 2026 11:47

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitar has auto-approved this PR and enabled auto-merge (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Aug 7, 2026
@hyperpolymath
hyperpolymath merged commit cf2da39 into main Aug 7, 2026
21 of 22 checks passed
@hyperpolymath
hyperpolymath deleted the fix/scorecard-perm-escalation branch August 7, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant