Repository navigation
fix(agents): reject forged plugin owner authority - #104872
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 11:05 PM ET / August 26, 2026, 03:05 UTC. ClawSweeper reviewWhat this changesThe PR makes public agent ingress discard caller-supplied owner status and introduces a plugin-runtime admission path for authenticated channel owners. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof is added - 10 items remain Keep open. The central current-main privilege escalation is source-proven, but the new trusted-runtime path has a lifecycle race that can retain owner authority after plugin rollback; it also needs authority-specific real-behavior proof before merge. Priority: P0 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherChannel plugins turn inbound messages into agent runs, where sender ownership controls access to owner-only tools. The change places the ownership decision between the plugin runtime and agent command execution. flowchart LR
A[Inbound channel message] --> B[Channel plugin]
B --> C[Plugin runtime admission]
C --> D[Owner authority check]
D --> E[Agent tool construction]
E --> F[Agent response]
Decision needed
Why: This changes a public plugin authority boundary and deliberately changes prior owner-claim behavior; repository policy requires security-owner acceptance for widened trust or authority. Before merge
Findings
Agent review detailsSecurityNeeds attention: A concrete retained-authority race can let a revoked plugin callback cross the new owner-admission boundary after rollback. PR surfaceSource +75, Tests +116, Docs +6, Other -1. Total +196 across 15 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry a non-forgeable, closure-bound liveness assertion through lazy command dispatch, revalidate it immediately before owner-only tool binding or effects, and prove both rollback denial and authenticated-owner preservation. Do we have a high-confidence way to reproduce the issue? Yes, source provides a high-confidence harness path: retain a trusted plugin admission callback, begin lazy dispatch, revoke the plugin before its loader resolves, then assert that no owner-only tools are constructed. Is this the best way to solve the issue? No. Resetting public ownership is the right direction, but the proposed admission restores owner authority after an await without a final liveness check; authority must remain closure-bound through the privileged boundary. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b5fcae34fe13. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
43c6ac6 to
74e2b96
Compare
|
@clawsweeper re-review The branch has been rewritten from current main around the existing execution-identity admission. Public Plugin SDK ingress can no longer author owner authority; authenticated hosts mint a token-bearing admission, all internal/bundled callers are migrated, the public SDK baseline was regenerated by its owner script, and Codex MCP arguments remain authority-free. Focused tests and Codex autoreview are clean on head Landing is intentionally stopped: the changed-file gate reproduces a current-main environment-ratchet failure ( |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
74e2b96 to
5448bc1
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Head |
2f19d29 to
ec4a65a
Compare
ec4a65a to
8e2b3c1
Compare
8e2b3c1 to
8908bfb
Compare
|
Land-ready exact head 52ff472: Untrusted public plugin ingress could claim owner privileges, while overly broad hardening could accidentally reject legitimate community guest ingress. Mint and validate trusted owner provenance only for actual claimed owner access; read canonical host-owned owner and channel facts exactly once. Forged public ingress exposes no owner-only tools; authenticated active-channel owners retain them; legitimate third-party guest ingress continues working. 277 cross-surface owner/guest/inactive-channel tests, clean fresh P1 review, exact CI, and direct upstream Codex protocol-source inspection all pass. Sanitized live proof: forged public ingress senderIsOwner=true resolves effectiveSenderIsOwner=false with no owner tools; authenticated active-channel owner resolves effectiveSenderIsOwner=true and retains nodes, mobile_ui, computer, automations, sessions, terminal, portal, gateway and conversations. MCP arguments do not establish host authority: personally checked codex-rs/core/src/tools/handlers/mcp.rs:174-192, codex-rs/core/src/mcp_tool_call.rs:110-140 and codex-rs/codex-mcp/src/binding.rs:251-282. Maintainer is an active security-operations team member. |
|
Merged via squash.
|
* fix(security): bind channel owner authority to trusted runtime * fix(plugins): preserve untrusted channel guest ingress * fix(plugins): snapshot channel ingress authority once
Problem
Public plugin ingress could claim owner privileges and reach owner-only tools.
Repair
Strip owner authority from public ingress; only an exact live trusted plugin/channel capability injected by its host can preserve authenticated owner state. Discord owners, lifecycle invalidation, recovery boundaries, and audit-disabled operation remain correct.
Verification
Original privilege-escalation regression reproduced; real production tool construction exposes no privileged tools to forged callers while genuine authenticated owners retain access. Hundreds of owner, recovery, plugin, and Discord tests plus independent review passed.