Repository navigation
feat: fill password fields from the Keychain or with approved agent text, and refuse typing or pasting into them otherwise - #124
Merged
Conversation
iamnbutler
force-pushed
the
feat/password-fill
branch
from
October 17, 2026 15:00
8f9ec53 to
7fd0eb5
Compare
…ext, and refuse typing or pasting into them otherwise (#117)
iamnbutler
force-pushed
the
feat/password-fill
branch
from
October 17, 2026 15:20
7fd0eb5 to
85b771f
Compare
…UIRES_FILL or FILL_REFUSED
This was referenced Oct 17, 2026
Merged
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.
Implements #117. Stacked on #120 (caller approval): it uses #120's prompt and caller identity, and lands after it.
desktop_fill_passwordfills the password field that has keyboard focus in a snapshot.servicenames a generic password andserveran internet password, with an optionalaccount. The runtime reads the item withSecItemCopyMatching, so macOS asks the user for each item, and the agent never sees it.Confirmations, names the caller (Callers.shared), the app and the site. Always Allow Agent-Supplied Passwords in the menu skips it; it is off by default. After 60 s the prompt is withdrawn withcancel(key:)and the fill is refused.Behavior change. While the live focused element is secure:
desktop_keyrefuses keys that enter characters and Command-V with any modifiers.desktop_insertrefuses every route: type, paste, and attachments.SECURE_FIELD_REQUIRES_FILLand a hint naming the fill tool.desktop_type,set_valueandselecton a secure element now use the same code.desktop_menurefuses a Paste command the same way. The host matches the resolved leaf byAXMenuItemCmdCharV with Command, or anAXIdentifierstarting withpaste, so localized titles are covered.desktop_menubar_clickonly opens a status item and never chooses a menu item, so it needs no check.desktop_click, and drag-and-drop.Native.
peekaboo-secure-fill.patchcomes last, after caller-admission. It adds thesecureTextFillop, its hook, the guard inhandleAuthorized, andHotkeyService.entersText.password.swiftwithdesktop_tools_set_password_autofill,desktop_tools_set_confirmation_handlers(ask, cancel)anddesktop_tools_answer_confirmation.Tests.
npm test: 77 pass, including a new password-fill test.npm run checkis clean.HotkeyEntersTextTests,PeekabooBridgeRequestPlanTests,PeekabooBridgeOperationSemanticPlanTestsandPeekabooBridgeOperationResultSemanticsTestspass (74 tests). The wire count is 134.