Repository navigation
feat(runtime): ask before granting sensitive sandbox access such as Docker - #239
Conversation
Initial reviewReview run: [REV-001] · medium · open · - · blocks:yes — Make automatic Docker access visible and configurableLocation: When a Docker socket exists, the adapter grants it to Codex automatically, including read-only review/rereview profiles. Access to the host Docker daemon can enable operations with host-level effects. This PR documents that capability, but it does not emit the requested one-time notice or provide a project YAML setting to opt out. Keep Docker access enabled by default so Codex is not blocked from using Docker. Add a one-time user notice and a project configuration setting that disables socket access when set, and apply that setting consistently to every profile that receives the socket. Security triage: confirmed privileged capability exposure by design; the missing disclosure and opt-out are the actionable issue. A read-only checkout fingerprint does not cover host effects outside the checkout. Checks observed: |
Resolution update[CCT-20261015-001] · manual · unknown/unknown→? · unknown · triaged:68cb620957a974dfd6140db33f499eead32b6433 · schema:2Review run: [REV-001] · medium · open · valid · blocks:yes — Make automatic Docker access visible and configurableDecision: Valid. The socket grants access to the host Docker daemon, so users need a visible notice and a project-level opt-out. Change: Docker socket access remains enabled by default. Codex prints a one-time notice when a socket is found and granted. Set Verification: The full local suite ran 1,396 tests and had four failures. Two were the sandbox permission expectations fixed by this commit and pass in the focused rerun. Two package-validator tests scanned the ignored local GitHub checks: Checks for HEAD Residual risk: When enabled, Docker daemon access retains host-level privileges. Set the project option to |
Add the Docker socket opt-out to the configuration example and the .code-cycle.yml reference table, which run_cycle.py treats as the list of accepted keys.
Resolution updateOutcome: RESOLVED [CCT-20261015-002] · manual · anthropic/opus→? · high · triaged:3ced485e46f485e84824b6eb14c05a40fc7f86bb · schema:2Review run: [REV-001] · medium · resolved · valid · blocks:yes — Make automatic Docker access visible and configurableLocation: Decision: The disposition stays Change in this round ( Verification (agent-reported):
Security: The only change in this round is documentation. The security triage in GitHub checks for Residual risk: When access is enabled, Codex stages that receive the socket can perform host-level Docker operations. |
Rereview[CCR-20261015-002] · manual · anthropic/opus→? · high · schema:2Previous runs: Outcome: REVIEW_PASSED_AWAITING_CI for HEAD Changes since the previous review (
|
| Profile | Socket when enabled | Socket with docker_socket_access=False |
|---|---|---|
| writing | present | absent |
| publishing-write | present | absent |
| publishing-review | present | absent |
| plain read-only | absent | absent |
The notice printed exactly once across all eight calls. load_config behaves as follows:
{}→truehost_socket_access: false→false0andnull→ rejected with "must be true or false"- an empty
docker:mapping →true
run_cycle.main passes docker_host_socket_access(config) into run_cycle(...), and that value reaches the dispatch kwargs. cycle.py is a library with no separate config-unaware entry point.
New findings
[REV-002] · low · open · - · blocks:no — Docker config tests split AllowedCommandsConfigTests
tests/test_run_cycle.py:369-488
class DockerConfigTests is inserted in the middle of AllowedCommandsConfigTests. Four existing tests now belong to DockerConfigTests instead of their original class:
test_malformed_test_commands_are_rejectedtest_allowed_commands_must_be_a_mappingtest_configured_command_reaches_a_nonpublishing_claude_implementationtest_fixed_routing_ignores_existing_telemetry_observations
On origin/main all four were in AllowedCommandsConfigTests (lines 368-443). They still run and pass, because both classes define the same load helper. But running AllowedCommandsConfigTests alone now silently skips them, and the test report files them under the wrong class. Fix: move DockerConfigTests after test_fixed_routing_ignores_existing_telemetry_observations.
Security triage
The deterministic rule (scripts/security_gate.py defaults) matched no path, file, or label. I added the audit on my own judgement, because the change widens the Codex sandbox to the host Docker daemon. I ran the audit inline against the changed trust boundary:
- TOML/argv injection: none found. The socket path is serialized with
json.dumps, which yields valid TOML basic-string escapes. The path comes from the operator's ownDOCKER_HOST, a trusted input. - Scope of the grant: only an existing, absolute, resolved Unix socket is granted (
resolve(strict=True)plusis_socket()), never its directory. TCP and SSH endpoints are excluded. The plain read-only profile never receives it. - Residual (accepted by REV-001's disposition, not a new finding): with the default
true, the publishing-review stage also receives the socket. That stage reads untrusted PR content, so a prompt injection there could perform host-level Docker operations that the checkout fingerprint cannot detect. The notice and docs disclose this, andhost_socket_access: falseremoves it.
No confirmed vulnerability.
Verification
git diff --check origin/main...HEAD: exit 0.python3 -m unittest discover -s tests -p test_executors.py: OK, 171 tests.python3 -m unittest discover -s tests -p test_codex_git_sandbox.py: OK, 23 tests.python3 -m unittest discover -s tests -p test_run_cycle.py: OK, 196 tests.- REV-001 reproduction with a real Unix socket: results above.
Not verified:
- Whether a real Codex CLI sandbox (Linux seccomp/Landlock, macOS Seatbelt) actually permits
connect()on the granted socket. All checks here inspect argv only. - Docker contexts selected via
docker context usewithoutDOCKER_HOST(for example Colima or rootless sockets) are not detected. This is a documented limitation. - The full local suite and
scripts/validate-package.pywere not rerun in this pass.
CI (HEAD 45c01d1, policy parallel, read once without waiting)
| Check | State |
|---|---|
| Skills, manifests, and Bash installer (run 38758722365) | pending |
| Skills, manifests, and Bash installer (run 38758730532) | pending |
| PowerShell installer (run 38758722365) | pending |
| PowerShell installer (run 38758730532) | pending |
0 passed, 0 failed, 4 pending. The CI gate decides the outcome from these.
Verdict
REVIEW_PASSED_AWAITING_CI: REV-001 is resolved. REV-002 is low and does not block approval. The residual risk is the default-on host Docker privilege for Codex stages that receive the socket, including publishing review.
…rant The native review scratch space from #240 appended its own permissions.code_cycle_publish_read.filesystem override after the Docker socket grant, so the later override replaced the earlier one and a publishing review lost either grant. Merge both paths into one table and make the scratch-only test independent of the runner's Docker socket.
DockerConfigTests was inserted inside AllowedCommandsConfigTests, moving four of its tests into the new class. Place it after them instead.
The socket path reaches the Codex argv through json.dumps, which doubles the backslashes of a Windows path, so a raw substring check failed on the Windows runner. Compare against the serialized form.
Resolution update[CCT-20261015-003] · manual · anthropic/opus→? · high · triaged:45c01d1d8484c02c7c1581a2821e9d24224ee84a · schema:2Review runs: Outcome: PARTIALLY_RESOLVED. The CI failures and REV-002 are fixed. A test of the real Codex sandbox found REV-003: the socket grant this PR adds does not work and crashes Codex. It blocks approval and needs a design decision before the fix. Findings[REV-001] · medium · resolved · valid · blocks:yes — Make automatic Docker access visible and configurable
The notice and the [REV-002] · low · resolved · valid · blocks:no — Docker config tests split
|
| Sandbox | Result |
|---|---|
code_cycle_publish_read with filesystem={"/run/docker.sock"="write"} (what this PR grants) |
Codex panics before running anything: failed to inspect synthetic bubblewrap mount target /run/docker.sock/.aws: Not a directory (os error 20), exit 101 |
code_cycle_publish_write with the socket in its filesystem table |
same panic, exit 101 |
:read-only, no grant, network off |
permission denied while trying to connect to the docker API |
:read-only, network fully enabled, no grant |
connects (29.8.2) |
filesystem={"/run/docker.sock"="read"}, network off |
permission denied |
publishing proxy (features.network_proxy=true, domain allowlist) |
permission denied |
publishing proxy + network.dangerously_allow_all_unix_sockets=true |
connects; api.github.com 200, example.com blocked, checkout still read-only |
:workspace + proxy with no allowed domain + dangerously_allow_all_unix_sockets=true |
connects; no external host reachable; workspace writable |
Cause:
- The grant crashes Codex. The Linux sandbox treats every
"write"filesystem entry as a directory root and mounts protected subpaths (.aws,.git, …) under it. A socket is a file, so the helper panics. - No filesystem grant is needed. The socket is already readable. What blocks it is the network sandbox: without network, seccomp blocks new
AF_UNIXsockets. In proxy mode they stay blocked unlessdangerously_allow_all_unix_socketsis set. The per-pathnetwork.unix_socketsallowlist is macOS-only, per the Codex network-proxy documentation.
Impact: on any Linux host with a Docker socket and the default host_socket_access: true, every publishing review stage and every publishing write stage fails at launch. That is a regression from main, where they only lacked Docker. The writable_roots grant for non-publishing writers cannot help either, because their network is off. The unit tests only inspect argv, so they do not detect this.
Fix direction (pending a decision): drop the filesystem and writable_roots grants. Then either enable dangerously_allow_all_unix_sockets under a proxy for the stages that should reach Docker, which opens every local Unix socket and not only Docker's, or withdraw Linux Docker access from this PR. Not verified on macOS (Seatbelt).
Failing checks fixed (not findings)
- Semantic conflict with feat(resolve): stage verification and native review scratch space #240. The
pull_requestrun of45c01d1failed intest_codex_grants_only_its_scratch_directory_and_preserves_publication. Cause: feat(resolve): stage verification and native review scratch space #240 (53da497) and this PR each add apermissions.code_cycle_publish_read.filesystemoverride, and the later one replaces the earlier. Fixed inf43a704(merge oforigin/main, no force-push) and4a35f79: both grants now go into one table, with a new regression test. REV-003 will remove the socket from that table again, but the merge logic stays correct for the scratch directory. - Windows.
test_host_docker_socket_notice_is_emitted_once_when_grantedsearched the argv for the raw path, butjson.dumpsdoubles a Windows path's backslashes. Fixed in7e5ec58by comparing against the JSON-escaped form.
Verification (agent-reported)
- Before the fix, the CI failure reproduced locally with a real Unix socket. The new test fails without
4a35f79and passes with it. - With
DOCKER_HOSTunset and with a real socket:test_executors.py176 OK,test_codex_git_sandbox.py23 OK,test_run_cycle.py196 OK,test_dispatch_failures.py27 OK. - Windows backslash path simulated on Linux: the raw search fails and the JSON-escaped search passes.
- In a clean copy of HEAD,
scripts/validate-package.pyexits 0 andtest_validate_package.pyreports 67 OK. The full suite has 2 local-only failures caused by the ignored.worktree/task-182. - Real Codex sandbox: the table under REV-003.
CI on 7e5ec5803d5b1ee1e7d4761a6f11bdbe0822aac3
| Check | Run | State |
|---|---|---|
| Skills, manifests, and Bash installer | 38793348477 (pull_request) |
pass |
| Skills, manifests, and Bash installer | 38793342918 (push) |
pass |
| PowerShell installer | 38793348477 (pull_request) |
pass |
| PowerShell installer | 38793342918 (push) |
pending |
Residual risk
REV-003 is open and blocks approval. Until it is fixed, merging this PR would break publishing Codex stages on Linux hosts with Docker.
Fixes REV-003. The Docker socket grant this branch added does not work: Codex's Linux helper refuses to start when a filesystem rule names the socket file, and no filesystem rule can enable connect() anyway, because the sandbox blocks new AF_UNIX sockets unless all of them are allowed through its network proxy. Verified with Codex CLI 0.162.1 and `codex sandbox`. Replace it with a general consent mechanism (scripts/grants.py). A stage that reports a sandbox restriction on a registered resource, starting with the host Docker daemon (docker_host), is never widened on its own word: - the question states what the grant really opens on this executor and platform, which for Linux Codex is every local Unix socket, not only Docker's, and the risks; - the answers are this cycle (in memory only, offered only where the grant stays isolated to the dispatch), persistent (stored per user outside the checkout, keyed by repository and scope fingerprint), or deny (this run only; the stage reruns without the grant and reports what it could not verify); - a configured fallback that recovers without a wider sandbox is tried first; a terminal is asked once; an unattended run stops with permission_required and is answered with --grant; - the grant applies only to Codex on Linux, keeps the publication domain allowlist and read-only reviews, and gives a writer no internet. code_cycle.docker.host_socket_access now defaults to false and, when true, authorizes docker_host in advance. Telemetry schema 20.
Resolution update[CCT-20261015-004] · manual · anthropic/opus→? · high · triaged:7e5ec5803d5b1ee1e7d4761a6f11bdbe0822aac3 · schema:2Review runs: Outcome: RESOLVED. Every finding is resolved, the full suite passes, and every required check of the pushed head passed. This is not an approval: a rereview decides that. Findings[REV-001] · medium · resolved · valid · blocks:yes — Make automatic Docker access visible and configurable
Disposition unchanged. At the user's decision, the original fix (a one-time notice with access on by default) is superseded by explicit, informed consent. Docker access is now off by default: [REV-002] · low · resolved · valid · blocks:no — Docker config tests split
|
| Profile | Grant | Docker | api.github.com |
example.com |
Checkout writable |
|---|---|---|---|---|---|
| publishing review | none | permission denied | 200 | blocked | no |
| publishing review | docker_host |
29.8.2 |
200 | blocked | no |
| publishing write | none | permission denied | 200 | blocked | yes |
| publishing write | docker_host |
29.8.2 |
200 | blocked | yes |
| writer | docker_host |
29.8.2 |
blocked | blocked | yes |
The writer without a grant keeps the legacy -s workspace-write, which codex sandbox cannot run.
Full suite in a clean copy of the head: 1439 tests OK, and scripts/validate-package.py reports VALID: 15 skills. It also passes in the developer checkout, except for the known validator failures caused by the ignored .worktree/task-182.
New tests:
test_grants.py(15): scope wording, the question shape, terminal answers, the store's per-repository keying, owner-only mode and scope fingerprint, denials never stored, and an unreadable store granting nothing.PermissionConsentTests(8): a stop without widening; cycle, persistent and terminal answers rerunning with the grant; denial rerunning without it; preauthorization; no scope on macOS; strict CLI parsing.- Recovery: a fallback that recovers is never asked about, and without a fallback the same executor reruns with the grant.
- Executor argv: no profile opens sockets without a grant; publishing keeps its domains; a writer gets no internet; linked worktrees keep their Git rules; the grant reaches the process and goes only to Codex.
Not verified: macOS (Seatbelt) and Windows, which receive no grant; a full codex exec run with a model.
Code review: self-review of the diff. One defect found and fixed before push: an unreadable consent store raised mid-cycle; it now grants nothing and asks.
Security triage: sensitive by judgement, since it widens a sandbox. The grant never comes from a stage's claim, only from a person's answer or the project's explicit setting. It is scoped to Codex on Linux and stated with its true reach. Residual risk below.
CI on a6b38462b80b7dc80670328b3cf931dacd17b1be
| Check | Run | State |
|---|---|---|
| PowerShell installer | 38801625501 | success |
| Skills, manifests, and Bash installer | 38801625501 | success |
| PowerShell installer | 38801618362 | success |
| Skills, manifests, and Bash installer | 38801618362 | success |
4 passed, 0 failed, 0 pending.
Residual risk
- Once granted, a Codex stage can reach every local Unix socket and, through Docker, act as root on the host. The question and the documentation say so.
- A persistent answer applies to every later cycle of the repository for the same scope, until the user removes it from the consent file.
Rereview[CCR-20261015-003] · manual · anthropic/claude-opus-5-5→? · high · schema:2Previous runs: Outcome: CHANGES_REQUESTED for HEAD Changes since the previous review (
|
| Profile | Grant | docker version |
Checkout | example.com |
|---|---|---|---|---|
| publishing review | none | permission denied | read-only | blocked |
| publishing review | docker_host |
29.8.2 |
read-only | blocked |
| publishing write | docker_host |
29.8.2 |
writable | blocked |
writer (code_cycle_write) |
docker_host |
29.8.2 |
writable | blocked |
No profile panics. Without a grant, no argv carries a socket path or unix_sockets option.
New findings
[REV-004] · medium · open · - · blocks:yes — A fallback that also hits the restriction ends the stage without ever asking for the grant
scripts/cycle.py:821-904 (the environment_restricted reroute and the consent block that follows it)
The consent request runs only when not retry and attempt == 0. When the stage's profile has a fallback on a different executor, attempt 0 reroutes to it (retry=True), so nothing is asked. If the fallback then reports the same restriction, it is attempt 1, so nothing is asked either, and the stage fails with reroute stopped: retry_exhausted.
Reproduced with the repository's own test fixtures: a Codex RestrictedAdapter primary and a Claude RestrictedAdapter fallback, both reporting the Docker blocker:
| Consent broker | Prompt called | pending |
Grant on any rerun | Stage |
|---|---|---|---|---|
terminal prompt answering cycle |
0 times | 0 | none | failed |
preauthorized={"docker_host"} |
n/a | 0 | none | failed |
| no prompt, no answer | n/a | 0 | none | failed, reroute stopped: retry_exhausted |
Impact: every default profile whose primary is Codex has a Claude fallback (scripts/router.py defaults, and this repository's .code-cycle.yml), so this is the common path. Then:
code_cycle.docker.host_socket_access: trueand--grant docker_host=…are silently ignored;- an unattended run never stops with
permission_required, so the orchestrator has no question to relay.
This contradicts docs/routing.md ("a person is asked only when none can") and the configuration reference ("true authorizes the docker_host grant in advance"). The new tests cover only a fallback that recovers and no fallback at all.
Fix direction: when the fallback attempt fails with a blocker that matches the same grant, request the grant for the primary target and rerun it with the answer, including the PENDING → permission_required stop. That needs a third attempt or an equivalent path. Alternatively, when the answer is already known (--grant, stored, or preauthorized), skip the fallback and rerun the primary with the grant. Add a cycle test for a fallback that fails.
[REV-005] · low · open · - · blocks:no — The consent question does not say the grant reaches every later Codex stage, including publishing reviews
scripts/grants.py (question, granted_context), scripts/cycle.py:696
The prompt reads "The {role} stage asked for …". But a cycle or persistent answer goes to every later Codex dispatch through ConsentBroker.granted, whether or not that dispatch asked for it. That includes publishing review stages, which read untrusted PR content and hold GitHub network access. With all Unix sockets open, a prompt-injected review could reach ssh-agent or a root Docker daemon. docs/routing.md says the grant "applies to the cycle's remaining Codex dispatches", but the question, which is what the person actually reads, does not say so. granted_context also tells the agent the grant is "for this stage".
Suggested fix: state the reach in the prompt, for example "it applies to every later Codex stage of this cycle (or repository), including reviews of untrusted pull-request content". Alternatively, limit the grant to the requesting role.
Security triage
The deterministic rule (scripts/security_gate.evaluate with the default rule) matched no path, file, or label. I added the audit on my own judgement, because the change widens a sandbox and adds a consent store. I ran it inline:
- Grant authority: a stage can only name a resource.
sandbox_blockerkeepsresourceonly when it matches[a-z][a-z0-9_]{0,63}, and the tests reject injection-shaped values. The grant itself comes only from--grant, a terminal answer, a stored answer, or the project setting. An unknown grant raisesExecutorErrorinCodexAdapter.argv. Claude never receivessandbox_grants. - Unattended runs:
--detachreruns withstdin=DEVNULL, so it never prompts.--grantis forwarded with the other arguments. - Consent store: per user, outside the checkout, written atomically through
mkstemp(0600) andos.replace. Denials are never stored. An unreadable store grants nothing. A stored answer is keyed by repository and a fingerprint of the effective scope. - Platform scope: only
codex/linuxhas a scope, so macOS and Windows are never widened (test_a_platform_without_a_scope_never_widens). - Residual, by design: once granted, every local Unix socket is reachable (Docker as host root, ssh-agent signing), as the question states. REV-005 covers what it leaves unstated.
No confirmed vulnerability.
Verification
git diff --check origin/main...HEAD: exit 0.- Full suite in a clean
git archivecopy of HEAD:python3 -m unittest discover -s tests, 1440 tests OK, exit 0. scripts/validate-package.pyin the same copy:VALID: 15 skills (7 cycle, 8 supporting), exit 0.- REV-003: the real
codex sandboxtable above. - REV-004: a reproduction script built on
tests/test_environment_recovery.pyandtests/test_cycle.pyfixtures, with the results in the table above.
Not verified:
- macOS (Seatbelt) and Windows, which receive no grant.
- A full
codex execrun with a model. - The interactive terminal prompt inside a real
run_cycle.pyrun. Only the unit tests with stub streams exercised it.
CI (HEAD a6b3846, policy parallel, read once)
| Check | Run | State |
|---|---|---|
| Skills, manifests, and Bash installer | 38801618362 | pass |
| Skills, manifests, and Bash installer | 38801625501 | pass |
| PowerShell installer | 38801618362 | pass |
| PowerShell installer | 38801625501 | pass |
4 passed, 0 failed, 0 pending.
Verdict
CHANGES_REQUESTED: REV-004 (medium, blocks approval) is open. REV-005 (low) does not block approval. Every required check passed.
Residual risk: once a person grants docker_host, Codex stages can reach every local Unix socket, Docker included. Docker carries host-root privileges.
Resolution triage[CCT-20261015-005] · manual · anthropic/claude-opus-5-5→? · high · triaged:a6b38462b80b7dc80670328b3cf931dacd17b1be · schema:2Review runs: [REV-004] · medium · open · valid · blocks:yes — A fallback that also hits the restriction ends the stage without ever asking for the grant
[REV-005] · low · open · valid · blocks:no — The consent question does not say the grant reaches every later Codex stage, including publishing reviews
|
…wall When a stage's fallback reports the same restriction as its primary, the consent question now goes back to the primary, which reruns with the answer after the fallback's effects are reconciled. Answers given in advance (--grant, stored, host_socket_access) now apply on this path, and an unattended run stops with permission_required instead of retry_exhausted (REV-004). The consent question and the granted context now say the grant reaches every later Codex stage, including reviews of untrusted pull requests (REV-005).
Resolution update[CCT-20261015-005] · manual · anthropic/claude-opus-5-5→? · high · triaged:a6b38462b80b7dc80670328b3cf931dacd17b1be · schema:2Review runs: Outcome: RESOLVED. REV-004 and REV-005 are fixed in Findings[REV-001] · medium · resolved · valid · blocks:yes — Make automatic Docker access visible and configurableUnchanged since [REV-002] · low · resolved · valid · blocks:no — Docker config tests split
|
| Check | Run | State |
|---|---|---|
| Skills, manifests, and Bash installer | 38807162223 | pass |
| Skills, manifests, and Bash installer | 38807156031 | pass |
| PowerShell installer | 38807162223 | pending |
| PowerShell installer | 38807156031 | pending |
2 passed, 0 failed, 2 pending. The pending checks are not reported as passed.
Residual risk
Unchanged: once granted, a Codex stage can reach every local Unix socket, Docker included, which acts as root on the host. The question now also says the grant reaches later review stages.
Rereview[CCR-20261015-004] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2Previous runs: Outcome: REVIEW_PASSED_AWAITING_CI for HEAD Changes since the previous review (
|
| Scenario | Observed |
|---|---|
Codex primary, restricted Claude fallback, answer deny |
Dispatch order codex, claude, codex. The third dispatch carries no sandbox_grants and a denial note. Nothing is granted. |
Codex primary and Claude fallback both restricted, prompt answers cycle, the rerun is still restricted |
The prompt is called exactly once. The stage fails with reroute stopped: retry_exhausted. No loop. |
Claude primary (no scope for the grant), restricted Codex fallback, answer cycle |
Claude, then Codex, then Codex again. Only the third dispatch carries sandbox_grants=("docker_host",). |
The --grant, preauthorized and prompt sources, the no-answer permission required: docker_host stop with a pending codex question, and the dirty-workspace handback stop (reroute stopped: dirty_workspace) are covered by the three new tests, which pass.
[REV-005] · low · resolved · valid · blocks:no — The consent question does not say the grant reaches every later Codex stage, including publishing reviews
scripts/grants.py
Resolved. The prompt now ends with "An allow reaches every later codex stage of the cycle (of the repository, if persistent), including reviews of untrusted pull requests." test_the_question_says_which_later_stages_the_grant_reaches asserts prompt.endswith(reach(...)) for five roles. That also proves the 600-character cap does not truncate it. granted_context names the later stages too.
New findings
None.
Observation, not a finding: the third dispatch (primary again, after the fallback) is recorded with relationship: "fallback", because the runtime derives that label from any change of executor. The reroute reason on the fallback's row, permission_answered, still identifies the path, and the attempt chain stays linked through parent_attempt_id.
Security triage
The deterministic rule (scripts/security_gate.evaluate with the default rule) matched no path, file or label. I kept the audit on my own judgement, since the change widens a sandbox and handles a consent store, and ran it inline over the increment:
- The new path only changes which target receives an answer that already exists (
--grant, stored, preauthorized, or terminal). A stage still only names a resource. No new source can widen the sandbox. - The primary is rerun only through
reroute_gate, so a fallback that left workspace effects stops instead of letting the primary run on top of them. Verified bytest_a_fallback_that_left_effects_is_not_handed_back_to_the_primary. - Consent is requested at most once per stage (
consent_requested), so a still-restricted rerun cannot trigger a prompt loop. Verified above. - A
denyanswer does not widen anything and is not stored. - The prompt now states the real reach of an allow, which closes the disclosure gap in REV-005.
No confirmed vulnerability.
Verification
git diff --check origin/main...HEAD: exit 0.- Full suite in a clean
git archivecopy of HEAD, committed withoriginset:python3 -m unittest discover -s tests, 1444 tests OK, exit 0. scripts/validate-package.pyin the same copy:VALID: 15 skills (7 cycle, 8 supporting), exit 0.- REV-004: the three extra scenarios above, run on that copy.
- Environment note: a first run in a copy with no commit and no
origingave 113 failures, andorigin/mainfails the same way there. The cause is the copy, not the branch. In the checkout itself, 2 tests intest_validate_packagealso fail, because an ignored local.worktree/task-182/is scanned for private paths. That is also unrelated to this PR, and neither run counts as the result.
Not verified:
- A real
run_cycle.pyrun with a Codex primary and a Claude fallback, and the interactive terminal prompt inside it. Only unit fixtures exercised them. codex sandboxwas not rerun:scripts/executors.pydid not change since the run inCCR-20261015-003.- macOS (Seatbelt) and Windows, which receive no grant.
CI (HEAD 308057b, policy parallel, read once, not awaited)
| Check | Run | State |
|---|---|---|
| Skills, manifests, and Bash installer | 38807162223 | pass |
| Skills, manifests, and Bash installer | 38807156031 | pass |
| PowerShell installer | 38807162223 | pending |
| PowerShell installer | 38807156031 | pending |
2 passed, 0 failed, 2 pending. The pending checks are not reported as passed.
Verdict
REVIEW_PASSED_AWAITING_CI: HEAD was completely rereviewed, every previous finding is classified (REV-001 to REV-005 resolved) and none blocks approval. The two PowerShell installer checks have not finished, so this is not APPROVED yet.
Residual risk: once a person grants docker_host, Codex stages can reach every local Unix socket, Docker included, which acts as root on the host. The question now says so, including for later review stages.
Rereview: CI confirmation[CCR-20261015-004] · manual · anthropic/claude-sonnet-5-5→? · unknown · schema:2Outcome: APPROVED for HEAD [REV-001] · medium · resolved · valid · blocks:yes — Make automatic Docker access visible and configurable[REV-002] · low · resolved · valid · blocks:no — Docker config tests split
|
| Check | Run | State |
|---|---|---|
| Skills, manifests, and Bash installer | 38807162223 | pass |
| Skills, manifests, and Bash installer | 38807156031 | pass |
| PowerShell installer | 38807162223 | pass |
| PowerShell installer | 38807156031 | pass |
4 passed, 0 failed, 0 pending. No open finding blocks approval. Residual risk is unchanged: once docker_host is granted, Codex stages can reach every local Unix socket, Docker included.
…ent nested Codex sandbox limit (#268) (#277) * fix(cycle): stop a reroute only on the cycle account's own publications (#268) Reconciliation compared every comment and review payload on the change request and issue, so another account's comment, a reaction or a changed timestamp blocked the single fallback. It now compares only the pull requests, comments and reviews the authenticated code-host account created or edited, by identity and content digest. An unreadable account is unavailable evidence. * docs(cycle): name the nested Codex sandbox limit in recovery guidance (#268) Codex's Linux sandbox overmounts /tmp/codex-daemon-<uid> read-only with mode 000 for the commands it runs, so a Codex stage cannot start a nested codex sandbox or codex exec. The runtime's profile and TMPDIR are not the cause. The guidance now tells the stage to report it once as sandbox_filesystem_access; no grant is enabled (#239). * fix(reroute): detect edits to existing foreign pull requests
Summary
Codex stages that need the host Docker daemon can now get it, but only with a person's explicit, informed consent, through a general mechanism for sensitive sandbox grants (
scripts/grants.py).AF_UNIXsockets unless all of them are allowed through its network proxy. A filesystem rule on the socket path makes Codex's helper refuse to start (REV-003). So thedocker_hostgrant opens every local Unix socket, and the question says so instead of presenting it as Docker-only.permission_required, the decisions record carries the question, and a rerun answers it with--grant docker_host=cycle|persistent|deny.cc-orchestratordocuments how to relay it.code_cycle.docker.host_socket_accessnow defaults tofalse;trueauthorizesdocker_hostin advance.permission_requiredstop reason and thepermission_requiredandpermission_answeredreroute reasons.main(feat(resolve): stage verification and native review scratch space #240): this branch's filesystem override replaced feat(resolve): stage verification and native review scratch space #240's review scratch grant. The grant is now a network option, so the conflict cannot recur.No linked issue. Related context: #142 discusses host command permissions.
Validation
Full suite in a clean copy: 1439 tests OK, plus
test_grants.py(15 tests).scripts/validate-package.py:VALID: 15 skills.Real Codex sandbox (Codex CLI 0.162.1, Docker 29.8.2, Linux), using the argv
CodexAdapter.argvgenerates:docker_hostworkspace-writeNot verified: macOS (Seatbelt) and Windows, which get no grant at all; a full
codex execrun with a model.