Skip to content

ci: scope workflow permissions to jobs instead of workflow level - #323

Closed
xavidop wants to merge 1 commit into
mainfrom
ci/scope-workflow-permissions
Closed

ci: scope workflow permissions to jobs instead of workflow level#323
xavidop wants to merge 1 commit into
mainfrom
ci/scope-workflow-permissions

Conversation

@xavidop

@xavidop xavidop commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Removes the workflow-level permissions: blocks in publish-docs.yml and release.yml.
  • Adds per-job permissions: scoped to what each job actually needs (e.g. only the deploy job in publish-docs.yml gets pages: write / id-token: write; only release gets pull-requests: write, etc).

This addresses zizmor's excessive-permissions finding, which was still failing PR #316 (actions/setup-java 5→6) after #322 fixed the unpinned-actions/template-injection findings — the job fails on any medium/high-severity zizmor finding, not just the "mandatory" ones.

Test plan

  • CI passes (zizmor GitHub Actions Scan should go green)
  • Confirm publish-docs.yml/release.yml still deploy/publish correctly on the next run (permissions were narrowed, not removed, for the jobs that need them)

zizmor's excessive-permissions audit flags broad top-level permissions
blocks in publish-docs.yml and release.yml. Move contents/pages/
id-token/packages/pull-requests permissions to only the jobs that
actually need them.
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@xavidop xavidop closed this Sep 1, 2026
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.

1 participant