Skip to content

fix(cua-driver): report safe browser signature diagnostics - #8074

Draft
renningg wants to merge 1 commit into
trycua:mainfrom
renningg:fix/7742-browser-signature-diagnostics
Draft

renningg wants to merge 1 commit into
trycua:mainfrom
renningg:fix/7742-browser-signature-diagnostics

Conversation

@renningg

Copy link
Copy Markdown

Summary

When macOS isolated-browser discovery finds an installed browser but its signature verification fails, it currently discards the reason and returns only a generic unavailable refusal.

Preserve bounded, safe verification details for failed candidates: the fixed browser identifier, verification stage, diagnostic category and exit code. Keep looking for a trusted candidate and return diagnostics only when discovery fails. Raw command output, paths and certificate details never enter the response.

Related work

Fixes #7742.

This is a focused diagnostic correction using the existing optional refusal detail field. No SDK signatures, refusal codes, permission boundaries or trust requirements change; no RFC proposed.

Compatibility and risk

  • Keep the Apple anchor, vendor team and identifier requirements, sealed-symlink verification, trusted installation locations, candidate ordering and success short-circuit unchanged.
  • Preserve the existing refusal code and message. No installed candidate retains its existing detail-free refusal.
  • Unknown or localized codesign failures receive a generic safe category, not raw stderr. Signature checks are never bypassed.
  • macOS adapter only; no generated bindings or dependency changes in this patch. Reverting the commit restores the previous generic diagnostics.

Validation

On macOS arm64, before syncing the subsequent main-branch release/packaging/docs changes:

  • 34 browser-platform unit tests passed, including four new tests covering failure categories/stages, private/oversized command output, candidate fallback/short-circuit, and aggregate failure details.
  • Strict cargo clippy --locked -p platform-macos --all-targets -- -D warnings passed.
  • bin/ci --quick --no-install: 5 passed, 3 heavy checks skipped.
  • Full platform-macos test run: 819 unit tests passed, 1 failed, 13 ignored; 2 integration tests passed. Desktop-only and documentation tests remained skipped/ignored as designed.
  • The failing, unchanged security_prompt::tests::the_system_consent_labels_include_allow_and_dont_allow expects the ASCII-apostrophe Don't Allow, which is absent from this host's system labels (the curly-apostrophe form is present). Restoring the exact main baseline reproduced the same failure; restoring the candidate then passed all 34 focused tests again.
  • A temporary native harness compiled the exact modified verification helper: stock Chrome and Edge passed, and an intentionally mismatched identifier on unchanged Chrome returned vendor_requirement_not_satisfied, stage signature_verification, exit code 3. No browser was altered or re-signed. This is a controlled negative check, not a natural damaged-installation end-to-end reproduction.

Final head 00cc287cde822c0ff8a9a248c91145c7f353e55d, based on main dde4a4b64a:

  • All 34 focused browser-platform tests passed again.
  • bin/ci --no-install: 6 checks passed, 1 failed, 1 skipped. Strict Clippy, formatting, headers, image refs and Windows cfg checks passed. The same system-consent-label test failed (819 passed, 1 failed, 13 ignored); both integration tests passed.
  • The release UniFFI drift check was skipped because libs/cua-driver/typescript/node_modules is absent. Docs generators were not routed because docs dependencies are absent. No dependencies were installed for these checks.
  • No claim of a fully green aggregate suite or completed desktop/cross-platform E2E is made. The local-CI signoff is intentionally unchecked.

Contributor and release checks

  • The PR is focused and the description matches the final diff.
  • This change does not require an RFC, or the accepted RFC is linked above.
  • Tests, documentation, and platform evidence are included or the gap is explained.
  • The PR title is a Conventional Commit describing the production change.
  • External contributor authorship is preserved, or no external contribution is included.
  • If release-tracked files changed but this is intentionally non-releasing, the no-release label is applied. (Not applicable: user-visible Driver fix.)
  • bin/ci is green and signed off (bin/ci --signoff).

This branch has not been deployed

No deployments
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.

macOS isolated browser discovery discards codesign failure details

1 participant