cmux next: the upstream computer use driver refuses cmux, terminals and password managers
Merged
LU
9d ago+1048+1048+0123456789012345678901234567890123456789-18-18-01234567890123456789
The upstream computer use helper (computerUse.driver = upstream, cua-driver in process) forwarded every tool call to the driver unchanged. Nothing stopped an agent from driving the person's cmux, a terminal, a password manager or security UI, which the legacy helper refuses. This adds the same guard to the upstream helper, checked against cua-driver v0.38.0 (the latest release; the repo pin is still v0.34.0).
- Target guard (
Packages/macOS/CmuxComputerUseHelper/.../CuaTargetGuard.swift,CuaTargetPolicy.swift): every tool call's targets are resolved to a bundle id before the driver runs:pid,window_id,bundle_id,app_name, nestedtargetobjects of every kind, and each step ofrun_steps/run_actions(steps with no target inherit the batch's). Refused: cmux builds, terminals, password managers (1Password, Bitwarden, Dashlane, LastPass, NordPass, Proton Pass, KeePassXC, Strongbox, MacPass, Enpass, Keeper, RoboForm, Secrets, Keychain Access, Passwords), security UI. Desktop-scoped input without an app target, unknown target shapes, and name selectors in batches are refused (fail closed). - Tools that dispatch inside the driver are refused:
run_script(also removed from the tool list withCUA_DRIVER_DISABLE_RUN_SCRIPT=1) andreplay_trajectory. - The allow-list comes only from the app: the helper reads it from the launch environment the app sets (a DEV build may allow only its own tagged bundle); the acpmux bridge no longer sends one, so an agent cannot start its own bridge with a wider list.
- Local build overrides for trying a newer driver without the shared asset store:
CMUX_CUA_SDK_PINinbuild-cua-helper-dev.sh,CUA_SDK_TAG/CUA_SDK_COMMITinbuild-cua-driver-sdk.sh. The published pin stays the default.
Known limit (same as legacy and the Codex app): a terminal panel inside an allowed app (an IDE) is not blocked; the owning app is checked, not the panel.
Changelog
- Added: the upstream computer use driver refuses to act on cmux, terminals, password managers and security prompts.
Tests
Packages/macOS/CmuxComputerUseHelper/Tests/CmuxCuaHelperCoreTests/:CuaTargetGuardTests(every target shape, batches and inheritance, dispatch tools),CuaTargetPolicyTests(bundle ids, names, prefixes, allow-list),HelperTargetScopeTests(requests cannot widen the launch allow-list).cmux-tui/crates/acpmux/tests/cua_mcp_bridge.rs: the bridge sends no allow-list.
Observed / Not run
- Ran locally (Xcode 26.6):
swift test --package-path Packages/macOS/CmuxComputerUseHelper: 37 passed.cargo test -p acpmux --test cua_mcp_bridge: 4 passed (the new case failed before the fix). Built the helper locally against cua-driver v0.34.0 and v0.38.0; v0.38.0 loads with no host change and answerslist_apps. - Three security reviews; the last found no way to widen the allow-list and two P1s (KeePassXC not blocked: fixed; IDE terminal panels: known limit above).
- Not run: real clicks with an ad-hoc local helper (no grants), the pin bump to v0.38.0 (needs the fleet to publish the asset).
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.