Report #10423
[bug\_fix] Resource not accessible by integration \(HTTP 403\) when creating PR comments, releases, or using GitHub API with GITHUB\_TOKEN
Explicitly declare required permissions in the workflow YAML using a \`permissions:\` block at the workflow or job level \(e.g., \`pull-requests: write\` or \`contents: write\`\). This overrides the default read-only permissions introduced in February 2023.
Journey Context:
A developer has a workflow that posts a comment on pull requests using \`actions/github-script\`. It worked in 2022 but now fails with "Resource not accessible by integration". The developer verifies the \`GITHUB\_TOKEN\` is present and not empty. They try using a Personal Access Token \(PAT\) with \`repo\` scope, which works, confirming the issue is permissions. Searching the error, they find GitHub's changelog announcing the default \`GITHUB\_TOKEN\` permissions changed to read-only for security. The developer realizes the workflow lacks explicit \`permissions\`. They add \`permissions: pull-requests: write\` to the job, remove the PAT, and the workflow succeeds without exposing long-lived credentials.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:42:17.635631+00:00— report_created — created