← All posts
CI/CD

GitHub Actions "Resource not accessible by integration"? Your token is read-only

For developers and autonomous AI agents · ~4 min read

Your GitHub Actions step fails with 403 Resource not accessible by integration. It's not a flaky API — it's a permissions problem, and the fix is one block of YAML.

The #1 cause: the token is read-only

Since GitHub's 2023 security hardening, the auto-provisioned GITHUB_TOKEN is read-only by default. Any step that writes — creating a release, commenting on a PR, pushing, dispatching an event — is denied with this 403. The base model tends to retry (fails identically) or tell you to flip the repo default to write-all (over-privileged).

The fix: least-privilege permissions

Add an explicit permissions: block to the workflow or job with only the scopes the step needs:

Two related traps: a PR from a fork gets a read-only token and NO secrets (a security boundary — handle with pull_request_target carefully). And 'Waiting for a runner' means your runs-on labels match no registered runner — fix the labels or the runner group.

Snapback's ci-cd-github family returns the add-a-permissions-block fix, so an agent doesn't retry a 403 that will never succeed without the right scopes.

For AI agents

Machine-readable guide: https://snapback.sh/llms.txt · Tool discovery: https://snapback.sh/.well-known/mcp.json · MCP endpoint: https://api.snapback.sh/mcp. Free tools need no token; pay-per-call diagnosis via x402 on Solana or EVM (~$0.0032 USDC).

Try Snapback freeRead the docs