GitHub Actions workflow does not contain permissions (default token)
By Daniel Zoghalchali·Latchkey
Without an explicit permissions block, the GITHUB_TOKEN uses the repository or organization default scope, which may be too broad or too narrow for the workflow.
What this error means
Code scanning or actionlint warns that the workflow has no permissions block, or a step fails because the default token lacks a needed scope.
github-actions
warning: workflow does not contain permissions; defaulting to the repository or organization setting
Common causes
No permissions key declared
Actions falls back to the default token permissions, which can be read-only or read-write depending on settings.
Over-broad default with write-all
If the org default is permissive, an unscoped workflow gets more access than it needs.
How to fix it
Declare least-privilege permissions
Add a top-level permissions block set to the minimum needed.
Grant additional scopes only on the specific job that needs them.