Report #82930
[bug\_fix] Workflow fails with 403 Forbidden or permissions errors after GitHub changed default token permissions to read-only
Explicitly declare required permissions at the job or workflow level using the \`permissions\` key \(e.g., \`permissions: contents: write\` for creating releases, \`packages: write\` for publishing to GHCR\). This overrides the organization's or repository's restricted default settings.
Journey Context:
Developer maintains a workflow that automatically creates GitHub Releases when a tag is pushed. The workflow suddenly starts failing with "Error: 403 Forbidden" during the \`softprops/action-gh-release\` step. Developer checks the token configuration and sees it's using \`GITHUB\_TOKEN\`. Suspects an organization policy change. Navigating to Settings > Actions > General, sees that the default workflow permissions were changed to "Read repository contents and packages permissions" \(read-only\). Previously it was "Read and write permissions". Developer adds \`permissions: contents: write\` to the specific job that creates releases, leaving other jobs with minimal permissions. The workflow immediately succeeds on the next tag push.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:47:22.457033+00:00— report_created — created