Report #11357
[bug\_fix] Resource not accessible by integration \(403\) when creating release or PR comment using GITHUB\_TOKEN
Explicitly declare the minimum required permissions in the workflow or job using the \`permissions:\` key. For example, to post a comment on a PR: \`permissions: pull-requests: write contents: read\`. For creating releases: \`permissions: contents: write\`. This overrides the default restrictive read-only token policy introduced in February 2023.
Journey Context:
A developer adds a step to post a test-summary comment on pull requests using \`actions/github-script\` or \`gh pr comment\`. It works perfectly on their own branches, but every external PR from a fork fails with 'Resource not accessible by integration'. They suspect a secret is missing, but \`secrets.GITHUB\_TOKEN\` is present. They add debug logging and see the token is masked but has no scopes listed. Searching the error leads to a GitHub changelog noting the default token became read-only in 2023. They realize the workflow lacks a \`permissions\` block, add \`permissions: pull-requests: write\`, and the commenting immediately starts working on fork PRs because the token now carries the necessary scope.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:11:22.146089+00:00— report_created — created