Skip to content

Scope GITHUB_TOKEN permissions per job - #210

Merged
paulinebm merged 1 commit into
mainfrom
security/scope-permissions
Sep 23, 2026
Merged

paulinebm merged 1 commit into
mainfrom
security/scope-permissions

Conversation

@hf-security-analysis

Copy link
Copy Markdown
Contributor

Workflow hardening

GITHUB_TOKEN permissions scoped per job

A workflow with no permissions: block inherits whatever the repository or the
organization hands out, which is commonly write access to everything. Any step
in that job — including one inside a third-party action — can then push commits,
open releases or edit issues with it.

Each block below grants a job the scopes its own steps need and nothing else.
Jobs that already declared their permissions were left untouched. The
workflow-level permissions: {} is only added once every job in the file
carries its own block, because on its own it would silently strip the jobs it
missed.

Workflow Job Granted
.github/workflows/deploy-to-hf.yml deploy contents: read
.github/workflows/update-conferences.yml update-conferences contents: write, pull-requests: write
.github/workflows/validate-conferences.yml validate contents: read

Opened by the workflow security bot. It changes what this pull request says it
changes, and nothing else.

A job with no `permissions:` block inherits whatever the repository
hands out. Each block added here grants what that job's own steps
need and nothing more.

@paulinebm paulinebm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved as part of the org-wide GITHUB_TOKEN permissions campaign.

@paulinebm
paulinebm merged commit 9359bed into main Sep 23, 2026
1 check failed
@paulinebm
paulinebm deleted the security/scope-permissions branch September 23, 2026 12:47
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