Report #17014
[bug\_fix] Resource not accessible by integration \(403\) when GITHUB\_TOKEN creates release or pushes to protected branch
Add explicit \`permissions\` to the job granting the required scope \(e.g., \`contents: write\` for releases, \`pull-requests: write\` for PR creation\). Root cause: Since February 2023, new repositories and organizations default the \`GITHUB\_TOKEN\` to restricted read-only access for all scopes except metadata, whereas previously it defaulted to read-write.
Journey Context:
A developer adds a workflow step using \`softprops/action-gh-release\` to automatically create a GitHub Release when a tag is pushed. On their personal test repository, it works perfectly. After merging to the company organization repository, the workflow fails with "Resource not accessible by integration" and HTTP 403. The developer checks the repository settings and finds "Workflow permissions" is set to "Read repository contents and packages" \(the new default\). They consider changing the organization default to "Read and write permissions", but the security team rejects this. After digging into the workflow syntax, they discover the \`permissions:\` key. By adding \`permissions: contents: write\` to the specific job that creates the release, the workflow succeeds without modifying the global security posture. The root cause was the behavioral change in default token permissions that separated legacy repos from new repos.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:16:22.054157+00:00— report_created — created