Repository navigation
CI: answer @claude mentions, fork PRs included, on the maintainer's subscription - #1468
Merged
Merged
Conversation
…s subscription Adds .github/workflows/claude.yml: issue, PR comment, inline review comment and review-body mentions of @claude run anthropics/claude-code-action (pinned to v1.0.283), signed in with the CLAUDE_CODE_OAUTH_TOKEN secret from `claude setup-token`. Only owners, members and collaborators start a runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts work A fork PR's head is checked out with only .claude/ and the instruction files restored from the base, so the SessionEnd hook would run the fork's tools/build-gc.sh with the token in its environment. Also scrub subprocess credentials, drop the no-op `assigned` trigger, and correct the header: on a fork PR only conversation comments get secrets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the job's read-only GITHUB_TOKEN instead of the org-wide App token (no push, no tag, no OIDC), turn off skills and subagents (on a fork they are the contributor's, through the .claude -> .agents links), disallow network and publishing commands, and sandbox Claude's commands with bubblewrap. Header rewritten to say what comes from the fork and what each guard is for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nstall ci/test_ci_timeouts.py requires every apt-get update under `timeout`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inline review comments Second security review: .claude/settings.json allows tools/ scripts that on a fork are the contributor's, and Read could open /proc/self/environ. Also turn on the inline-comment tool, and say plainly that the command rules are prefix rules and the token scope and scrub are the real limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/claude.yml. An@claudemention runsanthropics/claude-code-action(pinned tov1.0.283), signed in with the maintainer's Claude subscription through theCLAUDE_CODE_OAUTH_TOKENsecret, which is already set. Its main job is reviewing PRs, including PRs from outside contributors' forks.Who can start it
OWNER,MEMBERorCOLLABORATORstarts a runner. The action then re-checks write access and refuses bots.Why a fork PR can't run code or publish
.claude/,CLAUDE.mdandAGENTS.mdfrommain. Skills, agents (through the.claude -> .agentslinks), nested guides andtools/are the fork's.GITHUB_TOKEN, withcontents: read, PR and issue write, andactions: read. It can't push a branch or av*tag, so it can't triggerrelease.yml.id-token: write, so the job can't satisfy the Anthropic federation ruleissue-labels.ymluses.SessionEndhook would run the fork'stools/build-gc.sh). Skills, subagents and skill shell commands are off.tools/scripts are denied.curl,wget,gh,git pushandgit tagare denied, and so isReadof/proc. These are prefix rules, so the token scope and the scrub are the real limits.CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1strips them from Claude's commands, and bubblewrap runs those commands in their own PID namespace.github-actions[bot].What this gives up
Review
pr-reviewer, one round on the first commit: BLOCKER (hooks run fork code), MAJOR and MINOR, all fixed.tools/,/proc) added here.v*creation to admins and the deploy key.Checks
ci/test_ci_timeouts.py: OK.ci/test_ci_workflows.py: 103 tests OK.main. The first test is an@claudecomment on fork PR Open Watch Party: the protocol crate, its checks and eight conformance tables #1462. In that run, check the progress comment, thatps auxinside Claude's Bash shows only the sandbox, and that inline comments land.Build bench
🤖 Generated with Claude Code