Report #93421
[bug\_fix] Resource not accessible by integration \(403\) when creating GitHub Releases, posting PR comments, or pushing to protected branches using GITHUB\_TOKEN
Add explicit \`permissions:\` key at the workflow or job level. For releases use \`permissions: contents: write\`, for PR comments use \`permissions: pull-requests: write\`. Do not rely on repository default settings. The root cause is that GitHub changed the default GITHUB\_TOKEN permissions from read/write to read-only for security, and reusable workflows do not inherit caller permissions automatically.
Journey Context:
Developer sets up a workflow using \`softprops/action-gh-release\` to create a release when tagging. The job fails with "Resource not accessible by integration". Checking the job logs, the GITHUB\_TOKEN shows only \`metadata: read\` scope. Developer goes to repository Settings > Actions > General and changes "Workflow permissions" to "Read and write permissions", which works but violates security policies. They then discover the \`permissions\` key in workflow syntax. By adding \`permissions: contents: write\` specifically to the release job, the token gains only the necessary scope without changing repository defaults, and the release succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:23:39.596055+00:00— report_created — created