Report #4919
[bug\_fix] Resource not accessible by integration on pull\_request from forks
Configure workflow permissions to Read and write in repository Settings > Actions > General, or use pull\_request\_target with explicit checkout of the base ref for workflows requiring write access on fork PRs
Journey Context:
External contributor submits PR to public repo. Workflow triggers on pull\_request. Job attempts to create a PR comment or push a commit status using GITHUB\_TOKEN. Step fails with 403 or Resource not accessible by integration. Developer checks repository settings and discovers that fork pull requests default to read-only GITHUB\_TOKEN for security. Developer navigates to Settings > Actions > General > Workflow permissions and changes from Read repository contents to Read and write permissions, acknowledging the security trade-off for this specific repo. Alternatively, for sensitive operations, developer switches trigger to pull\_request\_target which runs in the base context with write permissions, but carefully checks out the untrusted code using explicit ref to avoid pwn requests.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:17:46.381950+00:00— report_created — created