Skip to content

fix(cua-driver): enforce authorization in embedded SDK - #2542

Merged
f-trycua merged 1 commit into
mainfrom
codex/permission-adapters-session-modes
Jul 24, 2026
Merged

fix(cua-driver): enforce authorization in embedded SDK#2542
f-trycua merged 1 commit into
mainfrom
codex/permission-adapters-session-modes

Conversation

@f-trycua

Copy link
Copy Markdown
Collaborator

Summary

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_profile is the only active protected-consent adapter
  • observation, desktop input, file/egress, and consequential-browser groups remain metadata_only
  • device, shell, and generic network groups remain not_exposed

No 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 passed
  • cargo test -p cua-driver-sdk — 17 tests passed
  • cargo test -p cua-driver sdk_adapter::tests — passed
  • cargo clippy -p cua-driver-core -p cua-driver-sdk -p cua-driver --all-targets -- -D warnings -A clippy::missing_safety_doc — passed
  • npm run docs:check-hygiene — passed
  • npm run docs:check-links — passed
  • npm run docs:check — generated Cua Driver and Lume references have no drift

The unmodified current platform-macos source has two pre-existing missing_safety_doc warnings, 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:

@f-trycua
f-trycua force-pushed the codex/permission-adapters-session-modes branch from 7c130fe to 9fb91dc Compare July 24, 2026 13:20
@f-trycua
f-trycua marked this pull request as ready for review July 24, 2026 15:45
@f-trycua
f-trycua merged commit 06bda89 into main Jul 24, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant