Report #75067
[bug\_fix] Resource not accessible by integration \(403\) when creating PR comments, releases, or pushing tags using GITHUB\_TOKEN
Explicitly declare the required permissions in the workflow YAML. Add \`permissions: contents: write\` for creating releases/tags, or \`permissions: pull-requests: write\` for posting PR comments, at either the workflow or job level. This overrides the default read-only token permissions.
Journey Context:
Your release workflow has been working for a year, but suddenly new repositories or organizations start failing with "Resource not accessible by integration" when trying to create a GitHub Release. You verify the GITHUB\_TOKEN is present in the secrets context, and the job appears to have a token, but the API call returns 403. You check repository settings and see nothing wrong. After searching, you discover that GitHub changed the default workflow permissions from write-all to read-only in February 2023 for new repositories and enterprises. The GITHUB\_TOKEN is scoped by the workflow's declared permissions; without an explicit \`permissions\` block, it defaults to restrictive access, blocking write operations to the API. Adding \`permissions: contents: write\` explicitly grants the token the necessary OAuth scopes to create releases or push tags.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:35:55.947078+00:00— report_created — created