fix(cua-driver): enforce authorization in embedded SDK - #2542
Merged
Conversation
f-trycua
force-pushed
the
codex/permission-adapters-session-modes
branch
from
July 24, 2026 13:20
7c130fe to
9fb91dc
Compare
This was referenced Jul 24, 2026
f-trycua
marked this pull request as ready for review
July 24, 2026 15:45
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CuaDriver.create()Why
RFC 2447 made the same-process SDK the canonical application path, but that path invoked the native registry without passing through
authorize_tool_call. Daemon transports performed the check, so direct Python/TypeScript/Rust SDK callers could bypass the process authorization stack.This change moves the authoritative check to the shared native dispatch boundary. Transport checks remain defense-in-depth and have no consent side effects.
The adapter inventory remains deliberately narrow:
browser_prepare.existing_profileis the only active protected-consent adaptermetadata_onlynot_exposedNo new user-owned capability is labeled active before a certified protected host and platform certification exist.
Verification
cargo test -p cua-driver-core— 348 unit tests, 2 contract tests, and 3 session lifecycle tests passedcargo test -p cua-driver-sdk— 17 tests passedcargo test -p cua-driver sdk_adapter::tests— passedcargo clippy -p cua-driver-core -p cua-driver-sdk -p cua-driver --all-targets -- -D warnings -A clippy::missing_safety_doc— passednpm run docs:check-hygiene— passednpm run docs:check-links— passednpm run docs:check— generated Cua Driver and Lume references have no driftThe unmodified current
platform-macossource has two pre-existingmissing_safety_docwarnings, so the scoped Clippy run allows only that lint while denying every other warning.Review and follow-up
Claude Code Opus independently reviewed the plan against the exact base SHA and confirmed the same-process bypass. Its accepted findings are incorporated in the checked-in plan.
This is the first dependency-safe slice. It progresses #2385 and #2437 but does not close either umbrella: