Autofill logins by field role in the browser and desktop apps, with scrubbing

Aperta
#223 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

The issue blocks this work on #218 and builds on #219, and asks contributors to agree on a design before starting. Begin with the “Secrets the assistant may type” section in docs/guide/security.md, then read crates/builtin-tools/src/fill_secret.rs, browser.rs, and fill_secret_tests.rs. Done means the agreed slice meets its acceptance criteria, including leak tests and the specified platform checks.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: daemon area: security enhancement help wanted needs design

size: L · first-timer: no

Blocked until #218 (design and threat model) is agreed, and it builds on #219 (login entries). Security-sensitive: changes here need a maintainer review. Please comment before starting so we can agree on the design. Found a vulnerability? Do not file it here: see SECURITY.md.

Summary

Let a bot log in with a vault entry without choosing or seeing the fields: the daemon finds the username and password fields by their role in the managed browser and in desktop apps, types the values below the model layer, and scrubs the values (and anything that reveals them) from screenshots, accessibility trees and page snapshots, logs, event streams, recordings and memory.

Why it matters

Today the model names the field (browser_fill with secret: "login/github" on a field reference from a snapshot). That keeps the value from the model, but the model still drives a multi-step login by hand, and what the page shows afterwards is not controlled: a "show password" toggle, a page that echoes the value, or a screenshot taken right after typing can put it back in front of the model. A role-based login step and scrubbing make logins both easier and safer.

Current state

  • crates/builtin-tools/src/browser.rs and fill_secret.rs: browser_fill with secret checks the secret's origin allow-list against the live frame origin (and the top page for cross-origin frames) before any approval card exists, re-checks right before insertion, and keeps the value out of events, the journal, approvals, tool output and error text. desktop_type and desktop_set_value do the same for verified program identities (crates/builtin-tools/src/desktop.rs).
  • crates/secret-store/src/redact.rs masks the value and its encodings in text that leaves the tool. docs/guide/security.md lists what is covered: events, journal, approvals, tool steps, model history, recordings, tool output and error text.
  • Not a listed guarantee: screenshots and page snapshots taken after a fill, accessibility trees from the desktop backend, and the live view stream (crates/browser-cdp/src/live_view.rs, docs/api/live-view.md), for pages that echo or reveal a field.
  • There is no concept of a field role: the model passes a field reference from its own snapshot.

Proposal and suggested approach

Slices, each its own PR:

  1. Field roles in the browser. Classify fields from the live DOM/accessibility data (autocomplete="username"/current-password/one-time-code, type=password, labels), per frame, and a login step (browser_login or secret on a new login tool, name to be agreed) that fills username then password for one entry. Multi-step logins (username page, then password page) are supported by repeating the step; submitting stays a separate click under the normal approval rules. The same origin checks as today apply to every field.
  2. Desktop apps. The same by role through the desktop accessibility tree (password edit controls, labelled username fields), only for a verified program identity on the entry's allow-list.
  3. Scrubbing. After a vault fill, the affected field is masked in every screenshot and snapshot sent toward the model until navigation (for example an overlay or removal of the field's text), a "show password" toggle cannot reveal it to the model, page text and accessibility values that match the value or its encodings are redacted, and the live view and any recording apply the same mask. Where masking is not possible the tool says so and the step is refused rather than leaking.
  4. No new storage of the value. Nothing in memory/knowledge, chat history or logs may carry it; reuse the existing redactor and add tests for each sink (and extend the leak-test suite in #220).

Acceptance criteria

  • A scripted login against a local test page works with the model never receiving a field reference for the password or the value, and fails closed on a wrong origin, an unknown role or an unverifiable frame.
  • With a page that echoes the typed value and has a "show password" toggle, the canary value does not appear in any screenshot, snapshot, event, log or model request (cases added to the suite in #220).
  • The login step still asks every time unless a standing grant covers exactly this entry on this origin, and a run that has read untrusted content still gets the extra ask.
  • cargo test for browser-cdp, builtin-tools, agent-core, daemon-api and clippy pass on Linux and Windows; macOS and Wayland desktop paths may be added later but must refuse cleanly until then.

Out of scope

Solving CAPTCHAs or bypassing bot detection (the project never does), passkeys and hardware keys, one-time codes (they follow the TOTP slice in #219), and password reset or sign-up flows.

How to get started

Read the "Secrets the assistant may type" section of docs/guide/security.md, then crates/builtin-tools/src/fill_secret.rs and browser.rs (the live field-target check), and the fake driver in fill_secret_tests.rs. Comment here with your plan for field-role detection and which slice you would start with.

Lingua principale
Rust
Stelle
0
Fork
1
Merge medio
6h 54m
PR unite (30g)
152

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emreocell/Praxi-Bot

Tutte le issue di emreocell/Praxi-Bot

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.