fix(codex): require admin for native controls#97952
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 11:31 PM ET / 03:31 UTC. Summary PR surface: Source +40, Tests +153, Docs +14. Total +207 across 10 files. Reproducibility: yes. at source level: current main routes mutating /codex native controls and command-authorized bound turns toward native execution without rechecking the owner/operator.admin predicate. I did not run tests because this review was read-only, but the changed paths and regression tests are clear from source and PR-head inspection. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a maintainer-approved version that explicitly accepts the fail-closed owner/operator.admin boundary, keeps read-only Codex status surfaces available, and treats the senderIsOwner inbound-claim field as the intended narrow plugin API extension. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main routes mutating /codex native controls and command-authorized bound turns toward native execution without rechecking the owner/operator.admin predicate. I did not run tests because this review was read-only, but the changed paths and regression tests are clear from source and PR-head inspection. Is this the best way to solve the issue? Yes, this is the best inspected fix shape: it reuses the existing canMutateCodexHost boundary and carries only a prepared owner/admin fact into the bound-turn hook. A lower app-server-wide gate or compatibility mode would be broader product/API work rather than a narrower repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 54b09580f61b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +40, Tests +153, Docs +14. Total +207 across 10 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Behavioral proof and post-merge alignment update for head The original runtime proof was recorded at pre-rebase head Redacted terminal output from that run: {
"nonAdminOperatorWrite": {
"bindReply": "Only an owner or operator.admin can control Codex native execution.",
"appServerStarted": false,
"inboundClaim": { "handled": true },
"nativeMarkerCreated": false
},
"operatorAdmin": {
"bindReply": "Bound this conversation to Codex thread thread-proof in <temp>.",
"nativeTurn": {
"turn": { "id": "turn-proof-1", "status": "inProgress", "items": [] }
},
"nativeMarker": {
"approvalPolicy": "never",
"sandboxPolicy": { "type": "dangerFullAccess" },
"childProcess": true
},
"appServerMethods": [
"initialize",
"initialized",
"thread/start",
"turn/start"
]
}
}What this demonstrates:
Current-head alignment and review resolutions:
Focused current-head validation: Additional current-head validation:
Maintainer risk acceptance:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Gate Codex native session controls and bound turns on current owner or operator.admin authority. Preserve gateway scope precedence and read-only status behavior.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
* fix(codex): require admin for native controls Gate Codex native session controls and bound turns on current owner or operator.admin authority. Preserve gateway scope precedence and read-only status behavior. * fix(codex): align native authorization * fix(codex): preserve silent bound handling * fix(codex): narrow bound auth contract * fix(docs): refresh generated docs map
* fix(codex): require admin for native controls Gate Codex native session controls and bound turns on current owner or operator.admin authority. Preserve gateway scope precedence and read-only status behavior. * fix(codex): align native authorization * fix(codex): preserve silent bound handling * fix(codex): narrow bound auth contract * fix(docs): refresh generated docs map
* fix(codex): require admin for native controls Gate Codex native session controls and bound turns on current owner or operator.admin authority. Preserve gateway scope precedence and read-only status behavior. * fix(codex): align native authorization * fix(codex): preserve silent bound handling * fix(codex): narrow bound auth contract * fix(docs): refresh generated docs map
* fix(codex): require admin for native controls Gate Codex native session controls and bound turns on current owner or operator.admin authority. Preserve gateway scope precedence and read-only status behavior. * fix(codex): align native authorization * fix(codex): preserve silent bound handling * fix(codex): narrow bound auth contract * fix(docs): refresh generated docs map
Summary
What Problem This Solves
Sensitive native Codex controls did not consistently consume the owner/admin authorization facts already available to the command and bound-conversation paths.
Why This Change Was Made
Native execution and binding mutation should follow the existing privileged-control boundary while read-only status, help, and invalid-usage responses remain available.
Changes
canMutateCodexHostowner-or-operator.adminpredicate./codex computer-use installauthorization and documentation unchanged.operator.adminscope for native Codex execution, control, binding, and detach operations.docs/docs_map.mdafter rebasing onto currentmain.Validation
Evidence
node scripts/run-vitest.mjs extensions/codex/src/commands.test.ts extensions/codex/src/conversation-binding.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/command-auth.owner-default.test.ts— 4 files, 391 tests passed across 3 shards.node scripts/generate-docs-map.mjs --check— generated docs map is current.node scripts/check-src-extension-import-boundary.mjs --json— no violations.node scripts/check-sdk-package-extension-import-boundary.mjs --json— no violations.node scripts/check-test-helper-extension-import-boundary.mjs --json— no violations.node scripts/format-docs.mjs --check— 670 files clean.node scripts/check-docs-mdx.mjs docs README.md— 686 files passed.node scripts/docs-link-audit.mjs— 5,494 internal links checked, zero broken.git diff --check— passed.Notes
User Impact
Owners and
operator.admincallers retain native Codex control. Ordinary command-authorized senders can still use read-only/status surfaces but cannot start, mutate, detach, or drive native Codex execution. Command-authorized, non-empty blocked bound turns explain the owner/admin requirement; ordinary unauthorized or empty bound traffic remains silently handled.Maintainer acceptance: the fail-closed access change and the single optional
senderIsOwnerinbound-claim field are intentional. Command authorization alone must not grant native Codex control, and the prepared owner/admin decision is required to recheck authority at bound-turn time. RawgatewayClientScopesare not added to the hook event.pnpm docs:listwas attempted but pnpm aborted an interactive modules-directory reconciliation in the non-TTY checkout. The underlying generated-map, formatting, MDX, and link checks were run directly and passed.AI-assisted change; I reviewed the implementation and validation results.