Repository navigation
macOS engine: observation never reads, keeps or shows a password field's value, length or selection (#405) - #411
Merged
Merged
Conversation
…nd never reads a password field's value, length, Markdown or selection (refs #405) Every element is now read in two requests: all its attributes but AXValue and AXNumberOfCharacters first, then those two, beside AXRole and AXSubrole read again, only when the first classified it as neither a password field (role or subrole AXSecureTextField) nor unclassifiable (a role or subrole it could not read). A field the second request finds closed keeps nothing of it, and a request keeps only what it asked for. The Markdown read and the focused element's AXSelectedText are classified just before, and select_text refuses a password field before reading it. A password field's node carries `secure: true` and no value, length or Markdown, stays settable, and its identity keeps no value (valueUnread). The settle's busy walk reads no value attributes at all; the observation that reuses its reads adds only the value's request, and a re-fetch walk asks for the value only of an element the rest already matches. Sminos-Session: cursor235#b93055dd (cua on macbook)
…or selected text, in the full tree and the diff (refs #405) A node the engine marks `secure`, or whose role or subrole is AXSecureTextField whatever value it carries, keeps no value or Markdown in the renderer: its Value part prints `secure text`, no transformation can take a value from it, the trailer drops the selected text when it is the focused element, and so a diff never sees what it holds change. Every other node renders byte for byte as before. Sminos-Session: cursor235#b93055dd (cua on macbook)
…th (refs #405) agent-cursor.md's typing paragraph gains a sentence after its password-field sentence: an observation's value for such a field reads `secure text`, selectText cannot select in it, and a screenshot shows what the field displays. The docs oracle and the core-documentation test carry it byte for byte; PROVENANCE.md and the surface inventory's "Table 3 addition (2026-11-17, #405)" record it. Sminos-Session: cursor235#b93055dd (cua on macbook)
…s debt (refs #405) The entry records the classification before every value read, what a password field's node and identity carry, the entry points covered, the renderer's `secure text`, the cost, the model's sentence, and what is left: the paste's effect reading, logged in tech-debt-tracker.md. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…es just before and in its own batch, and a paste's password-field numbers stay in the engine (refs #405) The review of 2e5b305..6dc4bcd. `guardedRead` requests value-bearing attributes only beside AXRole and AXSubrole, drops the whole answer when that classification is closed, and sends that batch only after a classification made just before it. - AXValueDescription is value-bearing: read in the guarded batch, kept off a password field's node and identity, and dropped from Details by the renderer. - A field the Markdown's classification finds closed closes the walk's data and the source's cache: the node is secure, its identity valueUnread. - A structure the settle's busy walk read is classified again before the value's batch. - The focused selected text and select_text's value and attributed reads go through the guard; select_text refuses a field closed by then. - A failed value read (`valueFailed`) is no longer a wildcard in a match that needs the value. - A listed read asks for the role and subrole whatever the element lists. - Paste (ruling 1ea561bc:808): a password field's range and count are read to judge the paste, which confirms only a count moved by exactly the line less the replaced selection, and the meta carries only `secure`. Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
… not in the macOS observation (refs #405) #409's sentences said a masked field still shows the value's length. With #405 that holds for the screen, and so screenshots, but cua's macOS observation reads such a field as `secure text` with no length; the Linux engine's still shows the masks (#407). The README's secrets paragraph and the end of secrets_list's description say so, and the hint digest in test/mcp-maws-hint.test.mjs is re-recorded, naming #405. Sminos-Session: cursor235#b93055dd (cua on macbook)
…d (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…a wildcard, and a paste is judged on its numbers alone (refs #405) The re-review of 6dc4bcd..6a1c765, seven findings. - The paste reading reads role, subrole, range and count in one batch and marks the numbers by that batch's classification, or its failure. - A Markdown classification that fails as a whole closes the field; select_text refuses when its classification before the attributed read fails. - A value batch that cannot classify, or fails, marks the element unverified (valueFailed, descriptionFailed), which matches only another unverified one; a batch that reads the role and subrole gives the data those fresher ones, so a known change to secure no longer matches on stale structural ones. The re-fetch walk decides each structural match by the full read. - AXValueDescription has its own unread and failed marks: #390's valueless source and ignoringValue compare it again. - Paste movement is the range's and count's (`moved`), never the secure mark; a notification no longer confirms where the count decides; and the count is judged against the delivered plain text, not a markup source. Sminos-Session: cursor235#b93055dd (cua on macbook)
…orded (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…d drops a password field's value as it is decoded (refs #405) Design ruling 1ea561bc:811: the separate classification request cost +44-61% walk time (smoke 44224481847), so each element is read in main's one batch, its role and subrole beside its value attributes, classified from that reply, and a closed element's value, value description and length dropped in the same function, before anything reads or formats the reply. An element whose role or subrole is missing or fails is treated as a password field. The structure-only read, the reuse's reclassification and the focus preflight go; the focused AXSelectedText and select_text's AXValue each ride in one batch with the role and subrole. The parameterized reads keep a classification just before, failing closed. Also the review of 6a1c765..bc52384: a failed paste poll is no reading and a password field's reading moves only on a number it read; the paste's batch keeps the budget's timeout; the identity records and compares `secure`; and two failed reads match only for the same handle. Sminos-Session: cursor235#b93055dd (cua on macbook)
… rejected two-request read's numbers (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
… only where one can be, and a closure by failure never matches another handle (refs #405) Ruling 1ea561bc:813: a role or subrole AXSecureTextField, an unreadable role, or a text-entry role whose subrole cannot be read still says `secure` (`secure text`); any other readable role whose subrole cannot be read has its value dropped and says `valueUnread`, rendered `value unread`. The review of bc52384..cd7a2f6: a closed reply's value attributes are left out of the names the data is decoded from, so nothing keeps, converts or bounds them; a closure by failure is recorded apart from `secure` (`classificationFailed`) and matches only another such for the same handle; and the stub's checks look for a distinctive 41-unit length in any form and its mask runs in the error wire and the captured stderr, failing when the capture fails. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ixes (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ned, so `value unread` keeps its line and index (refs #405) `descriptive` counted `secure` but not `valueUnread`, so an unlabelled AXGroup marked `valueUnread` was pruned before its Value part could print. Sminos-Session: cursor235#b93055dd (cua on macbook)
… on every platform (refs #405) The description is shared by the macOS and Linux computer surfaces, and the Linux one must name nothing of macOS (test/mcp-browser-surface.test.mjs). It now ends: a password field still shows its length on screen, one mask character per character. The README keeps the macOS `secure text` against Linux masks difference. The hint digest is re-recorded. Sminos-Session: cursor235#b93055dd (cua on macbook)
…-field-unread (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ord field's value, length or selection (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ue, length or selection in the fix's output, latency within noise (refs #405) Sminos-Session: cursor235#b93055dd (cua on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 18, 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.
What changes
On macOS, cua's observation read a password field's value like any other field's. Every app we measured masks it before cua sees it (see #405), so the agent got one mask character per character: the exact length, but not the text. Nothing in cua guarded the field, though, so a provider that returned plaintext would have put the password into native IPC, the Node diff cache, lineage identity and the agent's text. Now cua guards what leaves the engine or stays in it, whatever the provider returns (rulings 1ea561bc:804, 808, 811, 813, 817).
The read path (
native/engine/Sources/Engine/Fetch.swift):One batch per element, classified from its own reply.
ElementSource.classifiedDataasks for role, subrole and the value-bearing attributes (AXValue, AXValueDescription, AXNumberOfCharacters) in oneAXUIElementCopyMultipleAttributeValuescall. For ordinary window elements this is exactly main's request. When the reply classifies the element as closed, the value attributes are removed before anything decodes, converts, caches or formats them.What counts as closed (ruling 813):
These render
secure text, with no value, length, Details or selected text. Any other readable role whose subrole read fails (an AX error, not an absent or unsupported subrole) has its value dropped and rendersvalue unread.Parameterized reads (the Markdown/attributed-string read of text fields of up to 2,000 characters, and select_text's attributed read) can't share a batch with role. Each makes a role/subrole classification just before the read, and fails closed. select_text refuses a password field, because whether a search succeeds would reveal its text.
The focused element's AXSelectedText rides in a batch with role and subrole, and is dropped if that batch is closed.
Identity (
Lineage.swift):secure. A same-labelled plain field never inherits its token.Paste (ruling 808,
Paste.swift):secure: true, never a range or count..stringrepresentation for HTML or Markdown).Render (
src/services/engine/render.mjs):secure textandvalue unread. Neither is pruned when unlabelled. Non-secure output is byte-identical to main's.Docs:
secure textwith no length, and the Linux engine (Linux engine: audit and guard password-role fields in the observation walk (parity with the macOS secure-field rule) #407) still shows the masks.Evidence
Hosted qualification, kit on
probe/405-qual(README at 7813808): fix 5f29261 against main 11f1ff6, both unmodified, on GitHub-hosted macOS with synthetic passwords of 23 and 31 characters, 7 of them selected.secure text.{{secret:…}}typed into the CfT password field: delivered exactly 5/5 on each head. Only the fix's follow-up observation hides the length.{secure: true}.Latency (ruling 817). Small and large pages are within noise. A reused settle tree pays one classification request per Markdown read: about 12 ms on a page with 218 text fields, about 1 ms on a typical page with 5–20 inputs.
Limits
value unreadnode isn't pruned (none appeared live);Verification
swift test(native/engine): on the merged head: 1,333 tests, 0 failures, 1 skipped (pre-existing).-10020 The Mac is locked. The hosted test gate runs them.Plugin 0.28.13.
Closes #405
Sminos-Session: cursor235#b93055dd (cua on macbook)