Report #23953
[bug\_fix] HttpError: 403 - Resource not accessible by integration when creating release or commenting on PR
Add explicit permissions to the job or workflow: \`permissions: contents: write\` \(or \`packages: write\`, \`pull-requests: write\`, etc.\) to grant the GITHUB\_TOKEN the required access scope. Do not use a Personal Access Token as a workaround.
Journey Context:
You configure a workflow to create a GitHub Release using \`softprops/action-gh-release\` when a tag is pushed. It works perfectly in your personal test repository, but fails immediately after moving to an organization repository with 'Resource not accessible by integration'. You inspect the repository settings under Actions > General > Workflow permissions and discover it is set to 'Read repository contents and packages permissions'. You learn that GitHub changed the default permission model in 2023: new repositories and organizations now default to restrictive read-only access for the GITHUB\_TOKEN to limit blast radius of compromised workflows. The debugging involves checking the specific API endpoint that failed \(release creation requires 'contents: write'\) and realizing the token provided to the job only has 'metadata: read' and 'contents: read'. The fix is adding the \`permissions\` block to the YAML to explicitly declare write access for contents, which overrides the restrictive default only for that specific workflow job.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:37:09.089083+00:00— report_created — created