Repository navigation
ci(risk): pane host ops and allowlists are high risk - #23476
Conversation
What an agent pane's web page may make the host do or read now grades high by path: the AgentPageOps list, AcpmuxPaneMethods (relayed methods and knownParams), the page-op param tables, the frame check, AcpmuxPathPolicy, AgentPanePendingAsks, the cmux-agent-pane-policy crate and acpmux's remote_guard.rs. #22646's chat.asks.pending graded normal and reached a peer daemon until review caught it. Ordinary pane UI stays normal and the policy tests stay low. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
|
Owned by priority-view on cosmic-gray · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on afaf26d to compare; do not merge until green; see lane-rules |
Review of #23476 found three files outside the rule that decide what a pane page may make the host do: AgentPaneTransport+Frames (decide spends a click's ticket), AgentPaneGestureIntent (which methods a ticket redeems) and AgentPaneModel+Actions (connectActions, the app actions a page may run). The docs row now names the rule as the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
|
Bead |
|
|
Review of c0695a2 found AgentPaneUserGestures.swift (reserve, consume, redeem: the tickets a click mints) outside the rule; a change that let redeem accept any ticket would have graded normal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
…-tier-pane-host-ops
… transport files grade high Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
|
Found 9 test failures on Blacksmith runners: Failures
|
…ss refusal are pane host policy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bf1-fe0d-7f92-b3aa-5ffc1910a994&host=cosmic-gray
|
Review (independent subagent, scripts/ci/risk_tier.py rule, tests and docs row): SHIP at 05ee5b8
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
The risk-tier classifier now grades high the files that decide what an agent pane's web page may make the host do or read. Before this, they all graded normal.
#22646 added the page op
chat.asks.pendingtoAgentPageOps. Its handler,AgentPanePendingAsks.swift, opens its own connection to the local acpmux daemon and reads another chat's permission asks. Until review caught it, the read reached a peer daemon. The fix named the chatlocal/<id>and refused replies that name a peer. The whole change gradednormalby path, so the next such op would have been caught only by a reviewer's judgment, not by the path tiers.New rule in
scripts/ci/risk_tier.py, "agent pane host op or allowlist", placed right after the socket and relay rule:CmuxNextAgentPane/AgentPageProvider.swift: theAgentPageOpslist and itscalldispatch. Every new op edits this list.CmuxNextAgentPane/AcpmuxPaneMethods*.swift: the_acpmux/*methods a pane may relay and theirknownParams.CmuxNextAgentPane/AgentPaneEnvironmentRequest.swift,AgentPaneReplyRequest.swift: the page-op param tables.CmuxNextAgentPane/AgentPaneTransport+Check.swift: the frame check.CmuxNextAgentPane/AcpmuxPathPolicy.swift: the folder policy.CmuxNextAgentPane/AgentPanePendingAsks.swift: a host op that opens its own daemon connection for a page.CmuxNextAgentPane/AgentPaneTransport+Frames.swift:decide(), the gesture rule that spends a click's ticket (and grants folder roots).CmuxNextAgentPane/AgentPaneGestureIntent.swift: which methods a click's ticket may redeem.CmuxNextAgentPane/AgentPaneUserGestures.swift: the click tickets themselves (reserve,consume,redeem).CmuxNextAgentPane/AgentPaneModel+Actions.swift:connectActions, the app actions a page may run throughaction.run.CmuxNextAgentPane/AgentPaneTransport+RelayedAllow.swift: the decision proof a relayed allow carries, signed with the person key.CmuxNextAgentPane/AgentPaneTransport+PickedFolder.swift: a folder the person picks becomes a root the page's requests pass.CmuxNextAgentPane/AgentPaneTransport+FullAccess.swift: the refusal of a switch into a mode that skips approvals.cmux-tui/crates/cmux-agent-pane-policy/*: the Rust mirror (policy.json, src and Cargo.toml).cmux-tui/crates/acpmux/src/server/remote_guard*: what acpmux allows from a non-local connection.The rest of
CmuxNextAgentPanestays normal (for exampleAgentPaneView.swift,AgentPageProvider+Scroll.swift,AgentPaneTransportPacer.swift). The policy tests stay low, because the test rule comes first.docs/ci/risk-tiers.mdgets a new row under the socket and relay access policy kind, with #22646 as its evidence. There are still six kinds.This touches
risk_tier.py, so this PR isrisk:highand needs a person's approval.Review follow-up (c0695a2)
The independent review of c0b5b4e passed and named three gatekeepers outside the rule; they are added above, with test cases. Checked with
risk_tier.py'sclassify_pathon this head: all three gradehigh, andAgentPaneView.swift,AgentPaneModel+Composer.swiftandAgentPaneTransportPacer.swiftstaynormal.git merge-treewith #23371 at 0b7d7fe still merges cleanly. Lines touched at f08aa0f:risk_tier.pynew 95-111,tests/test_risk_tier.pynew 201-238,docs/ci/risk-tiers.mdline 30 (all new lines). A second review (of c0695a2) passed and namedAgentPaneUserGestures.swift, added in f08aa0f. The test file was not run on this Mac (a hook refuses it); CI's risk tier tests job runs it.Base merge and review follow-up (05ee5b8)
Merged feat-cmux-next afaf26d (13fdb5f; base hadn't touched
risk_tier.py). The independent review of 13fdb5f passed (SHIP) and named three transport files that also decide what a page may make the host do:+RelayedAllow,+PickedFolder,+FullAccess. Added in 945913d (test) and 05ee5b8 (rule and docs row).python3 -I tests/test_risk_tier.pyran on this Mac this time: red at 945913d ('normal' != 'high'for exactly those three paths), green at 05ee5b8 (31 tests OK).Changelog
none
Testing
New tests:
test_agent_pane_host_ops_and_allowlists_are_highandtest_ordinary_agent_pane_ui_and_policy_tests_stay_below_highintests/test_risk_tier.py. Therisk tier testsworkflow runs them on this PR (python3 tests/test_risk_tier.py -v).Observed / Not run
Observed:
python3 tests/test_risk_tier.py(heavy work on an interactive Mac). So I got red and green from the sameclassifyfunction the tests call, one path at a time:risk_tier.py classify --files <one path> --json.normal(AgentPageProvider.swift,AcpmuxPaneMethods.swift,AcpmuxPaneMethods+Params.swift,AgentPaneEnvironmentRequest.swift,AgentPaneReplyRequest.swift,AgentPaneTransport+Check.swift,AcpmuxPathPolicy.swift,AgentPanePendingAsks.swift,policy.json,params.rs,remote_guard.rs).high.AgentPaneView.swift,AgentPageProvider+Scroll.swiftandAgentPaneTransportPacer.swiftreturnednormal.cmux-agent-pane-policy/tests/swift.rsandacpmux/tests/remote_guard.rsreturnedlow.python3 scripts/cmux-next/prepush-gate.py: no new violations.python3 scripts/verify-local.py: 10 of 11 checks passed.localizationfailed on parity in catalogs this PR doesn't touch (base debt).git merge-tree --write-treeagainst ci(risk): an update channel setting is normal; the update path stays high #23371's head (0b7d7fe) merges cleanly. The two PRs change different lines of the same three files.Not run before 05ee5b8: the full
tests/test_risk_tier.pysuite locally (the hook refused it then). At 05ee5b8 it ran locally: 31 tests OK (see the follow-up section above).Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
The risk-tier classifier now grades high the files that decide what an agent pane's web page may make the host do or read, so a security slip like #22646's
chat.asks.pending(which reached a peer daemon until review caught it) gets caught by path instead of by reviewer judgment.scripts/ci/risk_tier.pycovering the page ops list, the relayable_acpmuxmethods and params, the page-op param tables, the frame check, the gesture rule (the click-minted tickets anddecidespending one), the app actions a page may run, the folder policy and the picked-folder roots, the relayed-allow proof, the full-access refusal, the Rust mirror, and acpmux's remote guard.risk_tier.pyitself, so it grades high and needs a person's approval.Written for commit 05ee5b8. Summary will update on new commits.