Skip to content

Hardening GITHUB_TOKEN permissions#403

Open
eskwor wants to merge 26 commits intomainfrom
hardening-gh-token-permissions
Open

Hardening GITHUB_TOKEN permissions#403
eskwor wants to merge 26 commits intomainfrom
hardening-gh-token-permissions

Conversation

@eskwor
Copy link
Copy Markdown
Contributor

@eskwor eskwor commented Mar 25, 2026

Hardening GITHUB_TOKEN permissions (least privilege)

  • we started by setting permissions: {} to fully disable all default GITHUB_TOKEN access
  • incrementally added only the permissions required for the workflow to succeed, based on observed errors

Why this change?

  • reduces risk of accidental or malicious misuse of the token
  • aligns with GitHub’s least-privilege security best practices
  • makes permissions explicit, auditable, and easier to reason about

Result: a minimal, secure, and maintainable permission set tailored to the workflow’s real requirements

Tested OK using

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