Repository navigation
Let agents use vault logins and 2FA codes inside their VM (GODM-18) - #19
Merged
Merged
Conversation
New vm tools fill_login / fill_totp type a saved login or the current 2FA code into the focused field on the VM's screen, key by key over VNC, so the value never reaches the model. Passwords only go in while macOS secure keyboard input is on (checked before and after typing, with ioreg/ps run without a shell; terminals refused), secrets are never pasted, and every attempt is audited. Opt-in via Settings -> Virtual machines (vm.vaultFill, needs the vault passphrase to turn on), since a fill in a VM can't be bound to a website.
# Conflicts: # packages/core/test/vms.test.ts
5 tasks done
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 does this change?
Agents working in a macOS VM can now sign in there with the vault's logins and 2FA codes (GODM-18).
vmtoolsfill_login/fill_totp. Godmode types the username, password or current 2FA code key by key over VNC into the field the agent clicked on the VM's screen. The value never appears in a tool result, and both tools take an optionalcoordinateto click the field first.ioreg→kCGSSessionSecureInputPID), and checks again afterwards. If focus moved while typing, the typed characters are erased again and the fill fails.ioregandpsrun throughtart execwithout a shell, so the guest user's shell setup can't fake them.vm.vaultFillis off by default. Turning it on needs the vault passphrase (grant), the same as other security-relevant switches. While it's off, the tools tell the agent where the human can turn it on.revealForAgent/codeForAgent/totpForAgent. Every attempt, including refusals and failures, goes into the audit log ascredential.fill/totp.fillwith the VM id and the app that owned the password field.How was it tested?
pnpm typecheckfor shared, core and desktop;pnpm --filter @godmode/desktop build.bun testinpackages/coreafter merging the latestmain: 593 pass, 9 skip, 0 fail.test/vms.test.tsagainst the fake tart, whoseioreg,psandpbcopyshims simulate a focused password field. They cover:submitPUT /api/settingsEnableSecureEventInputmakes the PID appear inioreg, and it disappears afterDisableSecureEventInput.Checklist
pnpm typecheckandpnpm testpasscargo clippy/cargo testpass (ifapps/desktop/src-taurichanged) — not changedpackages/sharedandapps/desktop/src/lib/api.tsdocs/ARCHITECTURE.md, README)