Skip to content

Remove job-level permissions from workflow_call-only workflows#294

Merged
tashian merged 1 commit intomainfrom
carl/remove-workflow-call-permissions
Mar 3, 2026
Merged

Remove job-level permissions from workflow_call-only workflows#294
tashian merged 1 commit intomainfrom
carl/remove-workflow-call-permissions

Conversation

@tashian
Copy link
Contributor

@tashian tashian commented Mar 3, 2026

Summary

  • Remove job-level permissions blocks from jobs in workflow_call-only workflows (goCI.yml, zizmor.yml, codeql-analysis.yml, frizbee.yml)
  • These blocks cannot escalate permissions beyond the caller's grant — they can only restrict. When a caller sets restrictive top-level permissions (e.g. contents: read), GitHub's static parse-time validation fails the entire workflow with startup_failure if any nested job declares permissions exceeding the caller's grant, even for jobs guarded by if: conditions
  • Add .github/zizmor.yml to suppress the resulting excessive-permissions findings for goCI.yml, consistent with other repos

See smallstep/certificates#2582 for the motivating failure.

Test plan

  • actionlint passes
  • zizmor --min-severity medium --min-confidence medium passes (0 findings)
  • Verify a consumer repo (e.g. certificates) CI no longer hits startup_failure

🤖 Generated with Claude Code

Job-level permissions blocks in workflow_call-only workflows cannot
escalate permissions beyond the caller's grant — they can only restrict.
When a caller sets restrictive top-level permissions (e.g. contents: read),
GitHub's static parse-time validation fails the entire workflow with
startup_failure if any nested job declares permissions exceeding the
caller's grant, even for jobs guarded by `if:` conditions.

Remove permissions blocks from:
- goCI.yml: top-level permissions and codeql job permissions
- zizmor.yml: zizmor job permissions
- codeql-analysis.yml: codeql-analyze job permissions
- frizbee.yml: frizbee job permissions

Add .github/zizmor.yml config to suppress the resulting
excessive-permissions findings for goCI.yml, consistent with the
convention used in other repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tashian tashian requested a review from a team as a code owner March 3, 2026 15:11
@tashian tashian enabled auto-merge March 3, 2026 15:15
@tashian tashian merged commit fa018e4 into main Mar 3, 2026
7 checks passed
@tashian tashian deleted the carl/remove-workflow-call-permissions branch March 3, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants