Report #41118
[bug\_fix] Resource not accessible by integration \(403\) when creating releases or pushing to protected branches
Explicitly declare the required permissions at the job or workflow level \(e.g., \`permissions: contents: write\`\). Root cause: GitHub changed the default \`GITHUB\_TOKEN\` permissions from read/write to read-only for new repositories and organizations in February 2023, causing legacy workflows to fail with permission errors when attempting write operations.
Journey Context:
You push a new tag to trigger a release workflow that uses \`softprops/action-gh-release\`. The job fails immediately with a 403 error 'Resource not accessible by integration' when attempting to create the release. You inspect the repository settings and confirm that Actions have read/write permissions in Settings > Actions > General. You check the job logs and notice that the 'Set up job' step lists the GITHUB\_TOKEN permissions, showing only 'contents: read'. You search for the error and find GitHub's February 2023 changelog announcing that new repositories now default to read-only tokens. You realize your workflow was written before this change and lacks explicit permission declarations. Adding \`permissions: contents: write\` to the job immediately resolves the 403 error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:29:11.251857+00:00— report_created — created