Report #71344
[bug\_fix] Resource not accessible by integration or 403 Forbidden when creating releases, commenting on PRs, or pushing to protected branches using GITHUB\_TOKEN
The default GITHUB\_TOKEN permissions changed to read-only in February 2023. Explicitly declare the permissions key in the workflow YAML at workflow or job level \(e.g., permissions: contents: write, pull-requests: write\) to grant specific write access. Alternatively, change the default permission setting in repository Settings > Actions > General > Workflow permissions to 'Read and write permissions'.
Journey Context:
You set up a workflow to automatically create a GitHub Release when a tag is pushed. The job runs successfully until the final step where it uses softprops/action-gh-release, which fails with 'Resource not accessible by integration'. You check the token scope in the repo settings and see it's set to restricted. You try adding env: GITHUB\_TOKEN: $\{\{ secrets.GITHUB\_TOKEN \}\} but it still fails with 403. After searching the error, you find GitHub's changelog from February 2023 announcing the change to read-only defaults. You realize the workflow lacks an explicit permissions block. You add permissions: contents: write to the job, and the release is created successfully on the next run.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:19:38.192822+00:00— report_created — created