Skip to content

macOS engine: observation never reads a secure field's value, length or selection (protection is the AX provider's today) #405

Closed

Description

@SSFSKIM

Problem

cua's macOS observation path reads a secure text field's value like any other field. Today every tested app masks the value before cua sees it, so the walk prints bullets at the exact length. That covers CfT 157, Electron 44 (default and MAWS-parity), Safari 27.2, Firefox 159 and AppKit NSSecureTextField, in runs 44203155183, 44206136831 and 44211615666 with kit probe/pw-walk 0d77eba. Still, nothing in cua guards the field: the protection is entirely the AX provider's. Any provider that returned plaintext for a password field would put the password into:

  • native IPC;
  • the Node latest diff cache;
  • the agent's observation text.

The audit at 290303c found the unguarded reads (file:line in cursor235's report):

  • Fetch.swift batches AXValue and AXNumberOfCharacters with role/subrole, rather than classifying first.
  • The walk reads AXAttributedStringForRange for text fields of up to 2,000 chars without a subrole check.
  • Skyshot reads the focused element's AXSelectedText unguarded.
  • Lineage identity stores the value as s:<text>.
  • render/diff print Value and the selected text with no secure check.

Masked fields also leak the length.

Work

  1. Classify role/subrole before any value read.
  2. For AXSecureTextField, and for Chromium's and WebKit's password role, never read AXValue, AXNumberOfCharacters, the attributed/Markdown range read, AXSelectedText or the selected range.
  3. Keep the value out of lineage identity for such fields; identity uses role, path and frame only.
  4. render and diff print secure text with no length.

Covers every observation entry point: the walk, the focused-element read (skyshot), and post-action re-resolution.

Proof

  • A unit test with a stub provider that returns plaintext for an AXSecureTextField: the plaintext appears in no IPC reply, cache entry, rendered text or diff, and no length appears either.
  • A live run of the pw-walk kit across the six lanes: each prints secure text with no bullets and no count; the non-secure fields are unchanged.
  • One run where a password field is the target of type with {{secret:…}}: the follow-up observation and diff show no value and no length.

Out of scope

  • A service-side filter of substituted secret values (separate ticket).
  • The Linux engine (separate ticket).

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 18, 2026
  2. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Taken by cursor235: building fix/405-secure-field-unread from main 2e5b305

  3. 12 remaining items

  4. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [review-trail] reviewer: doperpowers:reviewer-high (one agent across rounds). Two-request design: r1 2e5b305..6dc4bcd INCORRECT (7) -> 6a1c765; r2 INCORRECT (8: 7 fixed, Skyshot node invalidation dismissed as a boundary) -> bc52384; r3 INCORRECT (4). Design changed to single batch (ruling 811): rework bc52384..cd7a2f6 INCORRECT (3) + ruling 813 -> 5f29261; narrow re-review cd7a2f6..5f29261 confirmed and found 1 renderer pruning defect -> 05ed880. Post-review: e1df6b5 (platform-neutral secrets_list sentence after a red gate), merge main a39d26f, 0.28.13, evidence README. Qualification on 5f29261: 6 lanes 90/90 per head, latency within noise except +12 ms per 218 Markdown reads (ruling 817). ci-gate GREEN 44234590323 on ec25580.

  5. removed
    status:in-review
    on Nov 18, 2026
  6. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #411 (cua 0.28.13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions