Report #4275
[bug\_fix] Resource not accessible by integration \(403\) when creating releases, commenting on PRs, or pushing to protected branches using GITHUB\_TOKEN
Explicitly declare the \`permissions\` key at the workflow or job level. For releases or package publishing, set \`permissions: contents: write\`. For OIDC cloud access, add \`id-token: write\`. Root cause: GitHub changed the default \`GITHUB\_TOKEN\` from read-write to read-only for new repositories and organizations in February 2023; workflows assuming the permissive default now fail with 403.
Journey Context:
A developer migrates a working release workflow to a new repository. On push, the job using \`softprops/action-gh-release\` fails with "Resource not accessible by integration". The developer checks the repository settings under Settings > Actions > General > Workflow permissions and discovers it is set to "Read repository contents and packages permissions". Realizing the default changed, the developer initially considers switching the global setting to "Read and write permissions", but recognizes this violates least-privilege security. Instead, the developer adds \`permissions: contents: write\` to the specific job in the workflow YAML. The next run succeeds because the ephemeral GITHUB\_TOKEN is explicitly granted write scope for that job only.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:08:57.563932+00:00— report_created — created