Report #5955
[bug\_fix] GITHUB\_TOKEN default read-only permissions cause 'Resource not accessible by integration' on releases/packages
Explicitly declare permissions at the workflow or job level \(e.g., \`permissions: contents: write packages: write\`\). As of February 2023, workflows triggered by Dependabot or forked repositories default to read-only GITHUB\_TOKEN permissions for security, requiring explicit opt-in for write operations.
Journey Context:
A developer merges a PR that triggers a workflow using softprops/action-gh-release to publish a GitHub Release. The workflow worked on their feature branch but fails on main with 'Resource not accessible by integration'. They verify the repository settings allow GITHUB\_TOKEN write permissions, but the error persists. After checking the exact workflow run context, they notice the failing run was triggered by Dependabot. They find the February 2023 GitHub changelog announcing the change to default read-only permissions for security hardening. Adding \`permissions: contents: write\` to the job immediately resolves the 403 error, allowing the release to be created.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:43:36.136951+00:00— report_created — created