Repository navigation
feat(cycle): enforce per-stage host permissions for native stages - #269
Conversation
On a GitHub cycle each native Claude stage now receives only its stage's command table through --allowedTools, plus a PreToolUse hook the runtime adds to the dispatch. The hook parses every Bash command fail-closed and denies anything outside the table: chaining, substitutions, every force-push spelling, pushes to the base branch, gh api beyond the documented calls, and paths outside the dispatch's own TMPDIR. Codex stages run with --ignore-rules. Reviewers verify only inside a disposable clone: Claude under its Bash sandbox, Codex under a profile the runtime first proves confines writes to the clone and TMPDIR. A dispatch whose loaded configuration could override the hook stops BLOCKED, and a denied command is named in the stage report and the cycle's stop line. allowed_commands.verify adds exact verification prefixes; docker_host gains a compose-only Claude scope. Refs #142
host_permissions.py plans, applies, validates and reverts a conservative global set for interactive Claude and Codex sessions: it allows only reading and Git queries and denies force-pushes, merges and branch or remote-ref deletion. It never grants verification, writes, commits, pushes or pull requests, which stay per stage. It preserves existing hooks, settings and rules, backs up each file it changes, records the Claude entries it created outside the repository and marks its Codex block, removes only those on revert, and reports a hand-edited entry as a conflict instead of touching it. Refs #142
Initial review — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: Summary and scopeI reviewed the full accumulated diff from merge base
The hook parser, the checks on push and refspecs, the Findings[REV-001] · high · open · - · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
wc -l / sha256sum on the supplied diff |
5084 lines, f538ceda…2878: matches |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting)… |
python3 -m unittest discover -s tests |
exit 0, Ran 1581 tests in 266.410s — OK |
claude -p --settings <review_sandbox_settings> (Claude Code 2.1.302) |
refused to start: sandbox required but unavailable … socat not installed |
scratch repo: git grep -O… / git diff --output=… |
program executed / file written (REV-002) |
denied_docker_blocker + check on docker compose run |
grant blocker raised for a never-allowed command (REV-003) |
Unverified
- REV-001 at runtime: this host's Claude sandbox cannot start because
socatis missing, so I could not observe a sandboxedghcall. The finding rests on the code and current Claude Code documentation. codex sandbox --permission-profileprobe:probe_review_confinementwas exercised only through mocks in the tests. I did not run it against an installed Codex CLI.- Hook precedence: I did not run the hook end to end inside a live Claude dispatch. That a hook
denybeats another hook'sallow, and the RTK rewrite interplay, both come from the PR's own references.
CI (parallel policy: read once, not waited for)
Checks on e3844b3, read with gh pr checks 269 (exit 8):
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | pending |
| Windows test shard (windows-1) | pending |
| Windows test shard (windows-2) | pending |
| Windows test shard (windows-3) | pending |
| Windows test shard (windows-4) | pending |
No check has passed yet. The cycle's CI gate decides on them.
Residual risks
- When a review runs the configured verification, it executes code from the change under review. The Codex review profile allows GitHub network access, and
gh's credentials are readable under:read-only. This was already possible before this PR, but the docs' "reviewers can publish only their comment" holds only for Bash commands an agent types, not for code its test runner executes. Worth a sentence indocs/host-permissions.md. - Implementation and resolution stages run the test runner on code they wrote, so the hook does not limit what that code does. This is in line with the documented "writing stages run with the user's credentials" limitation.
- REV-001: give Claude's review sandbox network.allowedDomains for the code hosts, matching the Codex review profile, so gh can read and publish. - REV-002: drop git diff/log/show/grep from the opt-in global allow set; their options write files or run programs past a prefix rule. Re-apply withdraws entries an earlier version added. - REV-003: raise the docker_host blocker only for denials the grant lifts. - CI windows-4: quote literal temp paths in hook tests, since bash (and the hook) unescape a Windows path's backslashes otherwise. Refs #142
…view network limit Refs #142
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2Status: Findings[REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
python3 -m unittest tests.test_stage_permissions tests.test_host_permissions tests.test_stage_dispatch tests.test_environment_recovery tests.test_grants |
exit 0, 134 tests OK |
python3 -m unittest discover -s tests (final head) |
exit 0, Ran 1585 tests … OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting)… |
| Reproductions for REV-001, REV-002 and REV-003, and Windows-path parsing (Python against the scripts) | as described above |
Environment: Linux (WSL2), Python 3, git 2.34.1. The tests that create commits set their own identity. The Windows path behaviour was reproduced by parsing a Windows-style string on Linux. Whether inside_tmpdir accepts it on a real Windows runner is left to the windows shards.
Post-change review
- Delta base:
e3844b3, the latest trusted review receipt. It is an ancestor of86cc30d. - Fix-delta review: this pass found one problem in my first fix, and I fixed it in
86cc30d.check()on a deniedgit pushwould have rungit rev-parsein the runtime's working directory. - Security triage: fired by judgement, because the change is permission tooling. REV-002 and REV-003 only narrow what is allowed. REV-001 opens four code-host domains to sandboxed review commands, which matches the Codex profile, and that limit is now documented.
Checks of the pushed head (parallel policy: read once, not waited for)
I read the checks once on 86cc30dcd9c17b04b435a2d82a2f6ef45810ff53 right after the push. No check run was registered yet. The six expected checks are pending: Skills, manifests, and Bash installer, Windows test shard (windows-1…4) and PowerShell installer. The cycle's CI gate decides on them.
Residual risks
- REV-001 is untested at runtime on this host because
socatis missing. - A user's own
sandbox.network.allowedDomainsmerges into the review sandbox and is not refused bySANDBOX_WIDENING_KEYS. This was not raised in the review and is not changed here.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: What changed since the previous reviewTwo commits,
I rereviewed the full accumulated diff from merge base Previous findings[REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
wc -l / sha256sum on the supplied diff, and cmp with git diff 7a95124 86cc30d |
5187 lines, d3bc1705…ef32, identical |
python3 -m unittest discover -s tests |
exit 0, Ran 1585 tests in 160.147s — OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting)… |
Reproductions for REV-001, REV-002 and REV-003 (Python against scripts/) |
as described above |
REV-004 probe (denied_docker_blocker and check with and without tmpdir) |
blocker missed, as described |
git status --porcelain after the run |
clean |
Unverified:
- a live sandboxed
ghcall (socatis missing on this host); - the
codex sandbox --permission-profileprobe against an installed Codex CLI; - the hook end to end inside a live Claude dispatch.
CI (parallel policy: read once, not waited for)
Checks on 86cc30dcd9c17b04b435a2d82a2f6ef45810ff53, read with gh pr checks 269 (exit 0). Workflow run 39139818582 has head_sha 86cc30d, completed, success.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | pass |
| PowerShell installer | yes | pass |
| Windows test shard (windows-1) | no | pass |
| Windows test shard (windows-2) | no | pass |
| Windows test shard (windows-3) | no | pass |
| Windows test shard (windows-4) | no | pass |
The windows-4 failure from e3844b3 no longer reproduces.
Residual risks
sandbox_overridedoes not treatsandbox.network.allowedDomainsas a widening key, so a user or project setting can add hosts to the review sandbox. The impact is small, because verification code can already usegh's credentials againstapi.github.com, asdocs/host-permissions.mdnow documents. Adding the key toSANDBOX_WIDENING_KEYSwould keep "only the code hosts" literally true.- The resolver already noted the remaining risks: verification runs code from the change under review with
gh's credentials readable, and the writing stages run with the user's credentials.
…ew sandbox Claude reviews that may verify run under Claude Code's Bash sandbox, which on Linux and WSL2 needs bubblewrap and socat. Name both in the requirements, the host-permissions page, troubleshooting and the changelog, and in the BLOCKED message an unavailable sandbox produces.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: The head moved after the earlier clean rereview, so that approval is not reused. I rereviewed the current head in full, and this pass found a bypass in the stage hook that the earlier passes missed. What changed since the previous reviewOne commit,
I checked the new doc claims against the installed Claude Code 2.1.302 binary. Its settings schema has I rereviewed the full accumulated diff from merge base Previous findings[REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
wc -l / sha256sum on the supplied diff, and cmp with git diff 7a95124 ecb9e4c |
5230 lines, 859de2e9…6f14, identical |
python3 -m unittest discover -s tests |
exit 0, Ran 1585 tests in 159.155s — OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
sandboxed gh api …/pulls/269 through claude -p --settings <review_sandbox_settings> |
exit 0, printed the head SHA (REV-001) |
sandboxed curl https://example.com with the same settings |
denied by the sandbox proxy, exit 56 |
REV-002, REV-003 and REV-004 reproductions (Python against scripts/) |
as described above |
REV-005 scratch repo plus check() probes |
program executed, and the hook allows it |
Claude Code 2.1.302 binary: bwrapPath, socatPath, /sandbox |
present (the new doc claims hold) |
git status --porcelain after the run |
clean |
Unverified:
- the
codex sandbox --permission-profileprobe against an installed Codex CLI; - the hook end to end inside a full
run_cycleClaude dispatch. REV-005 was shown throughcheck(), the functionhook_maincalls.
CI (parallel policy: read once, not waited for)
Checks on ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f, read with gh pr checks 269 (exit 8), run 39140956154. main has no branch protection; the required checks below are the ones the previous rereview recorded.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | pass |
| PowerShell installer | yes | not yet reported (it runs after the shards) |
| Windows test shard (windows-1) | no | pass |
| Windows test shard (windows-2) | no | pass |
| Windows test shard (windows-3) | no | pending |
| Windows test shard (windows-4) | no | pending |
The cycle's CI gate decides on them.
Residual risks
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox, because it is not inSANDBOX_WIDENING_KEYS. This was noted in the previous rereview and is unchanged. - Verification runs code from the change under review, with
gh's credentials readable, and the writing stages run with the user's credentials. Both are documented.
…be docker denials with a TMPDIR REV-005: Git expands unambiguous long-option prefixes and bundles short options, so git grep -iO<cmd> and --open-files=<cmd> ran any program while the stage hook allowed them. Refuse every prefix of an executing long option, any git grep short flag cluster containing O, and abbreviated --output targets outside TMPDIR. REV-004: denied_docker_blocker probes with a stand-in TMPDIR, so a docker compose command redirected into $TMPDIR enters the grant flow. Refs #142
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2Status: Applied fixes[REV-005] · high · resolved · valid · blocks:yes — The stage hook matches Git's program-running options literally, so
|
| Level | Command | Result |
|---|---|---|
| evidence | wc -l and SHA-256 of the supplied accumulated diff |
5230 lines, 859de2e9…6f14, matches; PR head was ecb9e4c at triage |
| reproduction | scratch repo, git 2.34.1: git grep -iO"touch …", --open-files="touch …", --op=, --open=, --open-f= |
each one ran the program (the original finding is real) |
| reproduction | check() probe, old ecb9e4c modules and then new modules: the four REV-005 commands under review and rereview, fetch --upload-pa=… under resolve, and denied_docker_blocker(BLOCKED, ['docker compose logs > $TMPDIR/l.txt']) |
old: all allowed=True and blocker None. New: all allowed=False and blocker resource=docker_host |
| security | prefix fuzz of every length ≥ 3 of each executing option and of --output, in = and separate-word forms, for grep, fetch, pull, log, diff and show, across 4 roles, plus quoted and bundled -O forms |
0 allowed |
| test | python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch |
exit 0, Ran 83 tests — OK |
| test | python3 -m unittest discover -s tests |
exit 0, Ran 1588 tests in 160.814s — OK |
| static | python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
The tests set their own Git identity and temporary directories. Like CI, the local run does not depend on the global ~/.gitconfig. Unlike CI, it ran on Linux/WSL2 with git 2.34.1 only, not on Windows.
Unverified: the hook end to end inside a full run_cycle Claude dispatch. The fix was exercised through check(), which hook_main calls.
Post-change review
- Delta base:
ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f, the latest trusted rereview receipt. It is confirmed an ancestor of250dddf, so the post-change review covered only the fix delta (5 files, +81/−27). cc-code-reviewover the delta: no findings.- Security triage: the deterministic rule did not fire (no
security_review.always_when, no labels). Resolver judgement fired, because the change is to the permission hook. cc-security-reviewover the delta: no confirmed vulnerability.
CI (parallel policy: read once, not waited for)
Checks on 250dddf25812cf585dfa52b31d7e067536943022, read once right after the push:
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | queued |
| Windows test shard (windows-1) | in progress |
| Windows test shard (windows-2) | queued |
| Windows test shard (windows-3) | queued |
| Windows test shard (windows-4) | in progress |
| PowerShell installer | not yet reported (it runs after the shards) |
None of these has passed yet. The cycle's CI gate decides on them.
Residual risks
git grepnow refuses a single-dash cluster with a stuck argument that containsO, such as-eFOO. This fails closed;git grep -e FOOstill works.- Textconv and external diff drivers still need Git config, which a change under review cannot set, and
-c/-Cstay refused. Thesandbox.network.allowedDomainsmerge noted in the previous rereview is unchanged.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: What changed since the previous reviewOne commit,
I rereviewed the full accumulated diff from merge base Previous findings[REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
wc -l / sha256sum on the supplied diff, cmp with git diff 7a95124 250dddf |
5284 lines, 7aad9c6a…050fec, identical |
python3 -m unittest discover -s tests |
exit 0, Ran 1588 tests in 208.018s — OK |
python3 scripts/validate-package.py |
exit 0 |
REV-005 execution probe (112 forms × 4 roles), old vs new scripts/ |
old: 144 allowed and executed; new: 0 |
REV-004 / REV-003 denied_docker_blocker probes, old vs new |
as described above |
REV-001 review_sandbox_settings digest, ecb9e4c vs 250dddf |
identical |
REV-006 claude -p probes in scratch repos, inherited auto vs --permission-mode default |
edit applied and git status ran the program / edit refused |
git status --porcelain in the review clone after the run |
clean |
Unverified:
- The hook end to end inside a full
run_cycleClaude dispatch. REV-005 and REV-006 were exercised throughcheck()and a standaloneclaude -pwith the same--allowedTools, not throughClaudeAdapter.dispatch. dontAskas a fix was not probed.- No Windows run.
CI (parallel policy: read once, not waited for)
Checks on 250dddf25812cf585dfa52b31d7e067536943022, read once with gh pr checks 269 (exit 8) and statusCheckRollup, run 39142153932. main has no branch protection (gh api …/branches/main/protection → 404); the required checks are the ones earlier rereviews recorded.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | pass (3m10s) |
| PowerShell installer | yes | not yet reported (it runs after the shards) |
| Windows test shard (windows-1) | no | in progress |
| Windows test shard (windows-2) | no | in progress |
| Windows test shard (windows-3) | no | in progress |
| Windows test shard (windows-4) | no | in progress |
The cycle's CI gate decides on them.
Residual risks
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged from earlier rereviews. - Verification runs code from the change under review with
gh's credentials readable, and writing stages run with the user's credentials. Both are documented. git greprefuses a stuck single-dash argument that containsO(-eFOO). This fails closed.
…dit tools A non-writing Claude stage now runs with an explicit --permission-mode default, so the user's defaultMode (auto, acceptEdits) cannot approve an edit. The stage hook also matches Edit, Write, MultiEdit and NotebookEdit: it denies every edit to a non-writing stage and, for every stage, any edit to a .git directory or file or to Git's global configuration, which an allowed git status or git diff would otherwise turn into a program run. Resolves REV-006 on PR #269.
… aliases An edit denial no longer tells the agent to name a command a person can grant, because no grant lifts the edit rule. The .git check also matches the Windows aliases .git., .git and .git::$INDEX_ALLOCATION.
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2Status: Triage: the only open finding, REV-006, was classified Applied fixes[REV-006] · high · resolved · valid · blocks:yes — A reviewer inherits the user's
|
| Level | Command | Result |
|---|---|---|
| test | python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch tests.test_executors tests.test_host_permissions |
exit 0, 290 tests OK (on c52568e) |
| test | python3 -m unittest discover -s tests |
exit 0, Ran 1591 tests in 210.091s — OK (on the final tree, 7cc18dc) |
| static | python3 scripts/validate-package.py |
exit 0, VALID: 16 skills … |
| boundary | Live claude -p (Claude Code 2.1.302, model haiku) in a scratch repository. The argv and --settings were built by ClaudeAdapter.argv + policy_files for a review policy, and the agent was asked to append to .git/config with the Edit tool. The host's defaultMode is auto. |
250dddf shape (no mode, Bash matcher): written. Fixed: --permission-mode default, not written, hook denial in stream. Hook only (mode removed): not written, hook denial in stream. |
An earlier full run on c52568e failed 2 test_validate_package tests. The cause was this stage's scratch files under .local/, which tripped the private-data scan. The files were moved out of the worktree; the module and then the full suite passed.
Environment shared with CI: plain python3 -m unittest, no user-global Git identity used by the new tests. Not shared: the live claude -p probe, which needs an authenticated Claude CLI, and Windows (the alias and symlink cases are written to pass or skip there but did not run on Windows locally).
Post-change review
- Fix delta:
cc-code-reviewover250dddf..c52568e.250dddfis an ancestor of the new head and comes from the latest trusted rereview receipt. No P0, P1 or P2. One P3 was fixed in7cc18dc: edit denials reused the advice to "name the exact command so a person can grant it once", but no grant exists for an edit. - Security triage:
- The deterministic rule did not fire: no
security_review.always_when, no PR labels. - Reviewer judgement fired, because the change is the permission hook.
- An inline audit (a degraded pass, not a separate
cc-security-reviewrun) covered: symlinks and.., case, Windows short and stream aliases (hardened in7cc18dc), hard links (nolnin any table), relative targets, MCP tools (documented limitation), and the hook's denial being invisible to thepermission_denialsreport (correct: no grant applies).
- The deterministic rule did not fire: no
Checks of the pushed head (parallel policy: read once, not waited for)
The checks were read once on 7cc18dc85fa86a4f23a148a59027f37d389f2672 with gh pr view 269 --json headRefOid,statusCheckRollup. The head matched, and the rollup was empty: the workflow run had not registered yet. The expected checks are therefore all pending and none has a result: Skills, manifests, and Bash installer; PowerShell installer; Windows test shards 1–4. The cycle's CI gate decides on them.
Residual risks
- An MCP server that the user's configuration allows can still write files,
.git/configincluded. The hook covers Bash and Claude's four edit tools only. This is documented. - Reviewers can no longer create scratch files with the edit tools. Their execution evidence must come from the configured verification commands.
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged from earlier rereviews.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Verdict: What changed since the previous reviewTwo commits,
I rereviewed the accumulated diff from merge base
I read the fix delta (275 lines) in full. I reread Previous findings[REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
wc -l / sha256sum on the supplied diff, cmp with git diff 7a95124 7cc18dc |
5419 lines, e6959996…79de, identical |
python3 -m unittest discover -s tests |
exit 0, Ran 1591 tests in 200.049s — OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting)… |
check() probe: 18 reviewer write paths into .git |
all refused; git status allowed |
Live claude -p, Edit of .git/config, fixed shape |
hook denial, file unchanged |
Live claude -p, Edit of .git/config, hook only (inherited auto) |
hook denial, file unchanged |
Live claude -p, ctx_execute shell, fixed shape |
executed: mark outside the sandbox, git config written, no denial |
git status --porcelain in the review clone after the run |
clean |
Unverified:
- The full
ClaudeAdapter.dispatchpath. The live probes rebuiltargv/--settingsfrom the same functions, but not throughdispatch. - No Windows run of the alias and symlink cases; the CI Windows shards cover the unit tests.
- I did not probe whether
--strict-mcp-configremoves plugin-provided MCP servers.
CI (parallel policy: read once, not waited for)
Checks on 7cc18dc85fa86a4f23a148a59027f37d389f2672, read once with gh pr checks 269 (exit 8), run 39143991829. The required checks are the ones earlier rereviews recorded.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | pass (3m7s) |
| PowerShell installer | yes | not yet reported (runs after the shards) |
| Windows test shard (windows-1) | no | pass (4m56s) |
| Windows test shard (windows-2) | no | pass (3m32s) |
| Windows test shard (windows-3) | no | pending |
| Windows test shard (windows-4) | no | pass (4m20s) |
The cycle's CI gate decides on them.
Residual risks
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged from earlier rereviews. - Verification runs code from the change under review with
gh's credentials readable, and writing stages run with the user's credentials. Both are documented. - Reviewers can no longer create scratch files with the edit tools, so their evidence must come from the configured verification commands. That is intended.
ORCHESTRATION_RESULT (JSON)
ORCHESTRATION_RESULT
{"skill":"cc-rereview","status":"CHANGES_REQUESTED","issue_provider":"github","issue_id":"142","code_host":"github","change_request_id":"269","change_request_url":"https://github.com/datacas/code-cycle-toolkit/pull/269","pr_number":269,"issue_number":142,"comment_url":"https://github.com/datacas/code-cycle-toolkit/pull/269#issuecomment-6252236478","previous_reviewed_head_sha":"250dddf25812cf585dfa52b31d7e067536943022","reviewed_head_sha":"7cc18dc85fa86a4f23a148a59027f37d389f2672","head_sha":"7cc18dc85fa86a4f23a148a59027f37d389f2672","review_run_id":"CCR-20261018-005","reviewer":{"profile":"senior_reviewer","provider":"anthropic","model_requested":"anthropic/claude-opus-5-5","model_resolved":null,"effort":"high"},"verified_findings":[{"id":"REV-001","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-002","severity":"medium","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-003","severity":"medium","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-004","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-005","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-006","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"}],"new_findings":[{"id":"REV-007","severity":"high","status":"open","disposition":"-","blocks_approval":true,"path":"scripts/stage_permissions.py","line":1081}],"blocking_findings":["REV-007"],"checks":{"head_sha":"7cc18dc85fa86a4f23a148a59027f37d389f2672","passed":4,"failed":0,"pending":2},"blocking":false}
END_ORCHESTRATION_RESULT
|
Owner decision on REV-007 (non-Bash tools pre-approved by the user's configuration) REV-007 is accepted as a documented limitation, not something the stage blocks. The stage table and hook govern the cycle's Bash commands; MCP servers, plugins and other non-Bash tools stay governed by the user's own configuration. We cannot know in advance which tools a user installs, so an allow list of tools is not viable and is out of scope. Please publish REV-007 as Instead of blocking, the cycle informs. Implement in this PR:
REV-005 and REV-006 stay as fixed: they close specific Git and |
… stage table The owner accepted REV-007 as a documented limitation: the stage table and hook govern the cycle's Bash commands and file edits, and MCP, plugin and other non-Bash tools stay under the user's own configuration. A Claude stage on a GitHub cycle now reads the configuration its dispatch loads and the cycle reports those tools once in the stage report, flagging the ones whose names suggest they run code or write files. It never stops the stage. Refs #142
… pre-approved tools Refs #142
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2Status: Findings[REV-007] · high · not_applicable · debatable · blocks:yes — A reviewer can run any program through an MCP tool that the user's global configuration pre-approves; neither the hook nor the explicit mode nor the sandbox covers itDisposition The cycle now informs instead, as the owner asked (
On this host, the real configuration produces:
That names exactly the two tools REV-007 used. [REV-001] · high · resolved · valid · blocks:yes — Claude's verifying review sandbox gives
|
| Command | Result |
|---|---|
python3 -m unittest discover -s tests (at 880b0db) |
exit 0, Ran 1595 tests in 290.090s — OK |
python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch tests.test_run_cycle tests.test_cycle (at 31165bb) |
exit 0, Ran 363 tests in 157.320s — OK |
python3 scripts/validate-package.py (at 31165bb) |
exit 0, VALID: 16 skills (7 cycle, 9 supporting)… |
preapproved_outside_table + preapproved_notice on this host's real configuration |
3 tools listed, the two ctx_*execute tools flagged |
The local runs share these with CI: Python and the stdlib-only test suite, with Claude settings isolated by CLAUDE_CONFIG_DIR and a patched managed path. They do not share the Windows shards. No live claude -p dispatch was run for the notice. It is a reporting path, and the unit and cycle tests cover how it reaches the report.
CI (parallel policy: read once, not waited for)
Checks on 31165bbaf14db5ebfb2361b172ffc999b142bf2e, read once:
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | queued |
| Windows test shard (windows-1…4) | queued |
| PowerShell installer | not yet reported (runs after the shards) |
The cycle's CI gate decides on them.
Residual risks
- A pre-approved code-running MCP tool can still do anything the user can during a stage. It is now named, not prevented, by owner decision.
- The code-running flag reads the tool's name only; a tool with a neutral name that runs code gets no flag.
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2[CCR-20261018-006] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Status: What changed since the previous reviewThe previous rereview (
Evidence reviewed
Findings[REV-008] · low · open · - · blocks:no — A server-wide MCP approval (
|
| Command | Result |
|---|---|
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest discover -s tests |
exit 0, Ran 1595 tests in 224.906s — OK |
Probe script against scripts/ at the head (REV-001…007 checks, REV-008 reproduction) |
outputs as quoted above |
git status --porcelain --untracked-files=all after the runs |
empty; HEAD still 31165bb |
Not verified: no live claude -p dispatch was run to see the notice in a real stage report. The unit, dispatch and cycle tests cover how it reaches the report. The Windows shards were not run locally.
CI (parallel policy: read once, not waited for)
Checks on 31165bbaf14db5ebfb2361b172ffc999b142bf2e:
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | passed |
| Windows test shard (windows-1) | in progress |
| Windows test shard (windows-2) | in progress |
| Windows test shard (windows-3) | in progress |
| Windows test shard (windows-4) | in progress |
| PowerShell installer | not yet reported (runs after the shards) |
The cycle's CI gate decides on them.
Residual risk
- A pre-approved code-running MCP tool can still do anything the user can during a stage. It is named, not prevented, by owner decision.
- The code-running flag reads only names, and a server-wide approval misses it (REV-008).
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged.
Verdict: the review is complete for this head, with no open blocking finding. REVIEW_PASSED_AWAITING_CI.
ORCHESTRATION_RESULT (JSON)
ORCHESTRATION_RESULT
{"skill":"cc-rereview","status":"REVIEW_PASSED_AWAITING_CI","issue_provider":"github","issue_id":"142","code_host":"github","change_request_id":"269","change_request_url":"https://github.com/datacas/code-cycle-toolkit/pull/269","pr_number":269,"issue_number":142,"previous_reviewed_head_sha":"7cc18dc85fa86a4f23a148a59027f37d389f2672","reviewed_head_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","head_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","review_run_id":"CCR-20261018-006","reviewer":{"profile":"senior_reviewer","provider":"anthropic","model_requested":"claude-opus-5-5","model_resolved":null,"effort":"high"},"verified_findings":[{"id":"REV-001","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-002","severity":"medium","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-003","severity":"medium","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-004","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-005","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-006","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-007","severity":"high","blocks_approval":true,"status":"not_applicable","disposition":"debatable"}],"new_findings":[{"id":"REV-008","severity":"low","status":"open","disposition":"-","blocks_approval":false,"path":"scripts/stage_permissions.py","line":1292}],"blocking_findings":[],"checks":{"head_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","passed":1,"failed":0,"pending":4},"blocking":false}
END_ORCHESTRATION_RESULT
|
Owner decision on REV-008: fix it in this PR, do not defer it. A server-wide MCP approval ( |
mcp__<server> and mcp__<server>__* approve every tool of that server, so their name cannot clear them; the notice now flags them and any other MCP rule with a wildcard, naming what they approve (REV-008). Refs #142
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2[CCR-20261018-006] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-005] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:31165bbaf14db5ebfb2361b172ffc999b142bf2e · schema:2Status: TriageI judged every finding against Findings[REV-008] · low · resolved · valid · blocks:no — A server-wide MCP approval (
|
| Command | Result |
|---|---|
python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch |
exit 0, Ran 91 tests — OK |
python3 -m unittest discover -s tests |
exit 0, Ran 1596 tests in 218.889s — OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
| REV-008 reproduction against the fix | mcp__plugin_context-mode_context-mode → True, mcp__ctx__* → True, mcp__docs__query-docs → False |
git diff --check |
exit 0 |
The tests use no global Git identity or user configuration (temporary settings directories). Not run locally: the Windows shards and a live claude -p dispatch.
CI (parallel policy: read once, not waited for)
Checks on 736a9274b57a09ef3fa899edebcd0bd5e54e4d30:
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | queued |
| Windows test shard (windows-1) | queued |
| Windows test shard (windows-2) | queued |
| Windows test shard (windows-3) | queued |
| Windows test shard (windows-4) | queued |
| PowerShell installer | not yet reported (runs after the shards) |
The cycle's CI gate decides on them.
Residual risk
- A pre-approved code-running MCP tool can still do anything the user can during a stage. By owner decision it is named, not prevented (REV-007).
- The flag is still a hint from the name for rules that name one tool.
ORCHESTRATION_RESULT (JSON)
ORCHESTRATION_RESULT
{"skill":"cc-resolve-comments","status":"RESOLVED","issue_provider":"github","issue_id":"142","code_host":"github","change_request_id":"269","change_request_url":"https://github.com/datacas/code-cycle-toolkit/pull/269","pr_number":269,"issue_number":142,"comment_url":"https://github.com/datacas/code-cycle-toolkit/pull/269#issuecomment-6252827006","previous_head_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","triage_run_id":"CCT-20261018-005","triaged_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","finding_outcomes":[{"id":"REV-001","disposition":"valid","status":"resolved"},{"id":"REV-002","disposition":"valid","status":"resolved"},{"id":"REV-003","disposition":"valid","status":"resolved"},{"id":"REV-004","disposition":"valid","status":"resolved"},{"id":"REV-005","disposition":"valid","status":"resolved"},{"id":"REV-006","disposition":"valid","status":"resolved"},{"id":"REV-007","disposition":"debatable","status":"not_applicable"},{"id":"REV-008","disposition":"valid","status":"resolved"}],"resolved_findings":[{"id":"REV-008","status":"resolved","commit_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30"}],"unresolved_findings":[],"tests":{"ran":true,"passed":true,"conclusion":"verified_with_reservations","boundary":"not_required","evidence":[{"level":"test","command":"python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch","exit_code":0,"executed":91},{"level":"test","command":"python3 -m unittest discover -s tests","exit_code":0,"executed":1596},{"level":"static","command":"python3 scripts/validate-package.py","exit_code":0,"executed":null}]},"checks":{"head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","passed":0,"failed":0,"pending":5,"items":[{"name":"Skills, manifests, and Bash installer","state":"pending"},{"name":"Windows test shard (windows-1)","state":"pending"},{"name":"Windows test shard (windows-2)","state":"pending"},{"name":"Windows test shard (windows-3)","state":"pending"},{"name":"Windows test shard (windows-4)","state":"pending"}]},"blocking":false}
END_ORCHESTRATION_RESULT
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2[CCR-20261018-006] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-005] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:31165bbaf14db5ebfb2361b172ffc999b142bf2e · schema:2[CCR-20261018-007] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Status:
What changed since the previous reviewThe previous rereview (
Evidence reviewed
Findings[REV-009] · low · open · - · blocks:no — The 600-character cap on the pre-approved-tools notice can cut off its "can run code" clause, so flagged tools reach the report unflagged
I reproduced it against the head. This does not block: every tool is still named, the stage outcome is unchanged, and the cap predates this delta (it was already present at
Add a test with a list long enough to hit the cap. [REV-008] · low · resolved · valid · blocks:no — A server-wide MCP approval (
|
| Command | Result |
|---|---|
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest discover -s tests |
exit 0, Ran 1596 tests in 197.677s — OK |
python3 -m unittest tests.test_stage_permissions.ClaudeConfigurationTests.test_a_server_wide_mcp_approval_is_flagged tests.test_stage_dispatch |
exit 0, Ran 28 tests — OK |
Probe script against scripts/ at the head (REV-001…008 checks, REV-009 reproduction) |
outputs as quoted above |
git status --porcelain --untracked-files=all after the runs |
empty; HEAD still 736a927 |
Not verified: no live claude -p dispatch was run to see the notice in a real stage report. The Windows shards were not run locally.
CI (parallel policy: read once, not waited for)
Checks on 736a9274b57a09ef3fa899edebcd0bd5e54e4d30. The required checks come from the main ruleset: Skills, manifests, and Bash installer and PowerShell installer.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | passed |
| PowerShell installer | yes | not yet reported (runs after the shards) |
| Windows test shard (windows-1) | no | pending |
| Windows test shard (windows-2) | no | passed |
| Windows test shard (windows-3) | no | pending |
| Windows test shard (windows-4) | no | pending |
The cycle's CI gate decides on them.
Residual risk
- A pre-approved code-running MCP tool can still do anything the user can during a stage. By owner decision it is named, not prevented (REV-007).
- The flag is a hint from the name for single-tool rules. A long list can drop the flag clause entirely (REV-009).
- A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged.
Verdict: the review is complete for this head, with no open blocking finding. REVIEW_PASSED_AWAITING_CI.
ORCHESTRATION_RESULT (JSON)
ORCHESTRATION_RESULT
{"skill":"cc-rereview","status":"REVIEW_PASSED_AWAITING_CI","issue_provider":"github","issue_id":"142","code_host":"github","change_request_id":"269","change_request_url":"https://github.com/datacas/code-cycle-toolkit/pull/269","pr_number":269,"issue_number":142,"comment_url":"https://github.com/datacas/code-cycle-toolkit/pull/269#issuecomment-6252898879","previous_reviewed_head_sha":"31165bbaf14db5ebfb2361b172ffc999b142bf2e","reviewed_head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","review_run_id":"CCR-20261018-007","reviewer":{"profile":"senior_reviewer","provider":"anthropic","model_requested":"claude-opus-5-5","model_resolved":null,"effort":"high"},"verified_findings":[{"id":"REV-001","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-002","severity":"medium","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-003","severity":"medium","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-004","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-005","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-006","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-007","severity":"high","blocks_approval":true,"status":"not_applicable","disposition":"debatable"},{"id":"REV-008","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"}],"new_findings":[{"id":"REV-009","severity":"low","status":"open","disposition":"-","blocks_approval":false,"path":"scripts/run_cycle.py","line":1042}],"blocking_findings":[],"checks":{"head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","passed":3,"failed":0,"pending":4},"blocking":false}
END_ORCHESTRATION_RESULT
|
Owner decision on REV-009: fix it in this PR. The pre-approved-tools notice must never lose the "can run code" flag to the length cap: list code-running tools first, and when the cap is reached summarize the remainder (for example "… and N more") instead of cutting text mid-clause. Add a test with enough tools to exceed the cap. |
…tice is capped The notice listed every tool before its code-running clause and was then cut at 600 characters, so a long list lost the flag. Flagged tools now come first, and a list that does not fit ends in "and N more" instead of being cut mid-clause (REV-009). Refs #142
Resolution — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2[CCR-20261018-006] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-005] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:31165bbaf14db5ebfb2361b172ffc999b142bf2e · schema:2[CCR-20261018-007] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-006] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:736a9274b57a09ef3fa899edebcd0bd5e54e4d30 · schema:2This round resolves REV-009 as the owner decided (comment). I triaged it against Applied fix[REV-009] · low · resolved · valid · blocks:no — The 600-character cap on the pre-approved-tools notice can cut off its "can run code" clause, so flagged tools reach the report unflagged
Reproduction, using the reviewer's case (eight
New test: Earlier findings (unchanged)[REV-008] · low · resolved · valid · blocks:no — A server-wide MCP approval (
|
| Command | Result |
|---|---|
python3 -m unittest tests.test_stage_permissions tests.test_stage_dispatch tests.test_host_permissions |
exit 0, Ran 112 tests — OK |
python3 -m unittest discover -s tests |
exit 0, Ran 1597 tests in 134.007s — OK |
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
REV-009 reproduction against HEAD before and after the fix |
601 False before, 568 True True after |
git status --porcelain --untracked-files=all after the suite |
only the six intended files, which are now committed |
What the local run shares with CI: the tests use no Git identity or credentials. What it does not share: it ran on Linux (WSL2) with Python 3.10, and the Windows shards and the PowerShell installer were not run locally. I ran no live claude -p dispatch.
CI (parallel policy: read once, not waited for)
I read the checks once on 9fc0756cef92932c381eab933251f992e22dd764, right after the push. No check had reported yet. The required Skills, manifests, and Bash installer and PowerShell installer checks count as pending. The cycle's CI gate decides on them.
Residual risk
- A pre-approved code-running MCP tool can still do anything the user can (REV-007, by owner decision).
- Flagging is still a hint from the tool's name. When a list is long, some names collapse into
and N more, but the flag clause and the count always remain.
Status: RESOLVED. There is no open finding. This stage does not approve the PR.
Rereview — PR #269 (work item #142)[CCR-20261018-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-001] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:e3844b3e92a24b5b308f375251614b40a9f512f2 · schema:2[CCR-20261018-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCR-20261018-003] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-002] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:ecb9e4cbc6ce5682e5af1b7b63e064c920a1608f · schema:2[CCR-20261018-004] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-003] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:250dddf25812cf585dfa52b31d7e067536943022 · schema:2[CCR-20261018-005] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-004] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:7cc18dc85fa86a4f23a148a59027f37d389f2672 · schema:2[CCR-20261018-006] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-005] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:31165bbaf14db5ebfb2361b172ffc999b142bf2e · schema:2[CCR-20261018-007] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261018-006] · deep_coder · anthropic/claude-opus-5-5→? · high · triaged:736a9274b57a09ef3fa899edebcd0bd5e54e4d30 · schema:2[CCR-20261018-008] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Status: What changed since the previous reviewThe previous rereview (
Evidence reviewed
FindingsNo new findings. [REV-009] · low · resolved · valid · blocks:no — The 600-character cap on the pre-approved-tools notice can cut off its "can run code" clause, so flagged tools reach the report unflaggedResolved, verified by execution at the head:
The fix follows the owner's decision: code-running tools come first, and the rest are summarised as [REV-008] · low · resolved · valid · blocks:no — A server-wide MCP approval (
|
| Command | Result |
|---|---|
python3 scripts/validate-package.py |
exit 0, VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest discover -s tests |
exit 0, Ran 1597 tests in 260.911s — OK |
Probe script against scripts/ at the head (REV-001…009 checks, REV-009 reproduction, 20,000-case property check) |
exit 0, outputs as quoted above, failures 0 |
git status --porcelain --untracked-files=all after the runs |
empty; HEAD still 9fc0756 |
Not verified: I ran no live claude -p dispatch to see the notice in a real stage report, and I did not run the Windows shards locally.
CI (parallel policy: read once, not waited for)
Checks on 9fc0756cef92932c381eab933251f992e22dd764. The required checks come from the main ruleset: Skills, manifests, and Bash installer and PowerShell installer.
| Check | Required | State |
|---|---|---|
| Skills, manifests, and Bash installer | yes | passed |
| PowerShell installer | yes | not yet reported (runs after the shards) |
| Windows test shard (windows-1) | no | pending |
| Windows test shard (windows-2) | no | passed |
| Windows test shard (windows-3) | no | pending |
| Windows test shard (windows-4) | no | pending |
The cycle's CI gate decides on them.
Residual risk
- A pre-approved code-running MCP tool can still do anything the user can during a stage. By owner decision it is named, not prevented (REV-007).
- For single-tool rules, the flag is a hint from the tool's name. When a list is long, some names collapse into
and N more, but the flag clause and the count always remain. - A user or project
sandbox.network.allowedDomainsstill merges into the review sandbox. This is unchanged.
Verdict: the review is complete for this head, with no open finding. REVIEW_PASSED_AWAITING_CI.
ORCHESTRATION_RESULT (JSON)
ORCHESTRATION_RESULT
{"skill":"cc-rereview","status":"REVIEW_PASSED_AWAITING_CI","issue_provider":"github","issue_id":"142","code_host":"github","change_request_id":"269","change_request_url":"https://github.com/datacas/code-cycle-toolkit/pull/269","pr_number":269,"issue_number":142,"comment_url":"https://github.com/datacas/code-cycle-toolkit/pull/269#issuecomment-6253371209","previous_reviewed_head_sha":"736a9274b57a09ef3fa899edebcd0bd5e54e4d30","reviewed_head_sha":"9fc0756cef92932c381eab933251f992e22dd764","head_sha":"9fc0756cef92932c381eab933251f992e22dd764","review_run_id":"CCR-20261018-008","reviewer":{"profile":"senior_reviewer","provider":"anthropic","model_requested":"claude-opus-5-5","model_resolved":null,"effort":"high"},"verified_findings":[{"id":"REV-001","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-002","severity":"medium","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-003","severity":"medium","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-004","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-005","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-006","severity":"high","blocks_approval":true,"status":"resolved","disposition":"valid"},{"id":"REV-007","severity":"high","blocks_approval":true,"status":"not_applicable","disposition":"debatable"},{"id":"REV-008","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"},{"id":"REV-009","severity":"low","blocks_approval":false,"status":"resolved","disposition":"valid"}],"new_findings":[],"blocking_findings":[],"checks":{"head_sha":"9fc0756cef92932c381eab933251f992e22dd764","passed":2,"failed":0,"pending":4},"blocking":false}
END_ORCHESTRATION_RESULT
* fix(cycle): let read-only stages write only inside their $TMPDIR Since #269 a review, rereview or issue review could write no file, so the comment body its skill writes to $TMPDIR/pr-comment.md for --body-file could not exist and no review could publish. The hook now allows those stages to edit paths that resolve strictly inside the dispatch's TMPDIR, and allowed_tool_patterns grants one Edit(//<tmpdir>/**) rule so Claude's default permission mode approves the same write. The repository, .git, Git's configuration, sibling temporary directories, '..' and symlinks out of TMPDIR stay refused. Closes #272 * fix(cycle): grant read-only stages only their named helper files in $TMPDIR REV-001 on PR #273: Edit(//<tmpdir>/**) also covered the files Claude keeps in the same directory (materialised settings, tasks/ output, bash-edit-diff/), so a read-only stage could overwrite a background verification log. Both barriers now name only pr-comment.md, report.md, reply.md and top-level <check>.log, and the hook refuses a helper name that is not directly in $TMPDIR or resolves to another file there. Refs #272
Implements B1 of #142: per-stage host permissions for native Claude and Codex dispatches, and an opt-in global set for interactive sessions. B2 is #267.
Closes #142
Summary
Claude, GitHub cycles: each stage gets
--allowedToolsbuilt from its closed command table, plus aPreToolUsehook (scripts/stage_permissions.py). The runtime writes the hook and its policy outside the workspace andTMPDIR. The hook parses every Bash command fail-closed and only ever denies. It refuses:TMPDIR;heads/main, orHEADwhile on it);ghcalls outside the cycle's repository, PR, or work item;gh api, exceptgh api user --jq .loginand resolve's three review-thread GraphQL calls.Reviewers can publish only their comment. Docker allows only
compose up|down|ps|logs|build, and only under the new Claudedocker_hostscope.Codex: stages run with
--ignore-rules. Reviewers now run in a disposable clone, under a profile whose only writable paths are the clone andTMPDIR. Before a verifying review runs, the runtime proves that confinement with the installed CLI; if it can't, the review stopsBLOCKED.Fail-closed preflight: a Claude dispatch stops
BLOCKEDif any of these could override the hook:disableAllHooks;allowManagedHooksOnly;tool.checkmod;Verification is configured, not inherited:
allowed_commands.testand the newallowed_commands.verify(exact prefixes, validated) are the only verification commands any stage gets. Review and rereview run them only inside their clone. A denied command is listed in the stage report and named in the cycle's stop line, so it can be granted and the cycle resumed with--continue. This repository's.code-cycle.ymlnow declares both keys.Inactive elsewhere: other code hosts and providers, and Orca workers, keep the earlier behaviour, and each dispatch records
command_policy: inactive: ….cc-host-permissions/host_permissions.py:Skills:
cc-pr-reviewrunsgit merge-baseseparately (no$(…)) and skipsgit fetchin a clone without a remote;cc-resolve-commentsdocuments the three exact thread calls.Docs:
docs/host-permissions.md;role-workspace-policy.md,routing.md,configuration.md, and the README updated, including limitations and the migration note;Diagnosis
BLOCKEDon permission prompts, as in the refactor(F0): recover a missing structured result as pending verification #174 cycle. One-off "always allow" rules pile up in Codex'sdefault.rules. Agents keep their fullgh/gitaccess, so the publication policy was only a prompt.feature_request; decisionimplement. No defect to reproduce. The issue had already been reviewed as READY, with every design decision recorded in its body.ROLE_CONTRACTS) and its skills require, and nothing a global rule or another hook opens can widen that.git push, whichpush.defaultorremote.origin.pushcould send to the base branch, is now refused;heads/<base>and wildcard destinations are refused;ghcommands must name this repository's PR, or none at all before the PR exists;allow, so--allowedToolsand the user's deny rules stay in force;--allowedToolsis rebuilt from the dispatch-time policy (clone withoutorigin, RTK presence);tool_resultevents as well;runtime.manifestships the new modules.Work units
WU-1--ignore-rulesand review clone, Claude review sandbox, preflight, denied-command reporting,allowed_commands.verify, Claudedocker_hostscope, skill command fixes, docsscripts/stage_permissions.py,executors.py,run_cycle.py,cycle.py,environment_recovery.py,grants.py,runtime.manifest,windows-test-shards.json,.code-cycle.yml,skills/cc-pr-review,skills/cc-resolve-comments,docs/*,README.md,CHANGELOG.mdtests/test_stage_permissions.py(55),tests/test_stage_dispatch.py(23), updatedtest_grants.py,test_environment_recovery.pypython3 scripts/validate-package.pyexit 0;python3 -m unittest discover -s testsexit 0, 1563 testsWU-2cc-host-permissionsskill andhost_permissions.pyscripts/host_permissions.py,skills/cc-host-permissions/SKILL.md,tests/test_host_permissions.py,scripts/validate-package.py,.github/workflows/validate.yml,runtime.manifest,windows-test-shards.json,README.md,docs/README.md,docs/skills.mdtests/test_host_permissions.py(18)docs/host-permissions.md). Applying the global set on a machine is reversed withhost_permissions.py revert --yesVerification (agent-reported)
python3 scripts/validate-package.pypython3 -m unittest discover -s testsclaude -p(Claude Code 2.1.302) with a permissiveallowhook and the stage hook on Bashdenyprevailed; denial inpermission_denialsand thetool_resultclaude -pwith the review sandbox settingssandbox required but unavailable … socat not installed(fail-closed path)CodexAdapter().probe_review_confinement()with Codex CLI 0.163.0(True, "…confined writes to the clone and TMPDIR")codex execpolicy check --rules <generated block> -- …gh pr merge→forbidden;git status→allow;git push -ufandpython3 -c→ no rule (documented limitation)Shared with CI:
CLAUDE_CONFIG_DIR,CODEX_HOME, and the managed-settings paths, and use fake executors.claudeorcodexbinary is needed.Not shared with CI: the boundary rows above used this machine's installed CLIs. CI doesn't run them.
Residual risk
socat/bubblewrapare missing. Once this runtime is installed, a Claude review in a repository withallowed_commandsconfigured (this one included) fails as an environment restriction, and the cycle reroutes or stops. Fix: installbubblewrapandsocat.tool.checkprecedence: checked only from Claude Code's documentation. Notool.checkmod was available to test against the installed version; the preflight refuses one by inspection.sandbox.credentialsfor limiting a reviewer's credentials.codex execreports a refused command, and whether an execpolicyallowescapes the sandbox. Codex denials are therefore not yet named in the stop line.--allowedToolsand the user's configuration.BLOCKEDuntilallowed_commandsis configured.Routing for this stage: profile
deep_coder, requested modelanthropic/claude-opus-5-5, efforthigh, resolved model?.