RFC: Credential vault: threat model, data model and boundaries
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
- 20/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- documentation, security
Direzione di ricerca
Read docs/guide/security.md, then inspect crates/secret-store/src/fill.rs, crates/builtin-tools/src/fill_secret.rs, and the named tests to ground the proposal in current behavior. Draft docs/design/credential-vault.md with decisions for proposal questions 1–5, compatibility and rollback, and the requested threat model and leak-channel checklist. Done when maintainers agree to the document, rejected alternatives are recorded, and the linked follow-up issues reflect its decisions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
size: L · first-timer: no
Security-sensitive: changes in this area need a maintainer review, and please comment before starting so we can agree on the design. This is an RFC-first issue: the first deliverable is a written proposal and a threat model, not code. Found a vulnerability? Do not file it here: see SECURITY.md.
Summary
Design a credential vault: a place where the user stores things a bot needs in order to work on their behalf (a website login, an API key, a TOTP seed, an SSH key, a secure note), which the bot can use but whose values are never sent to the model. The first deliverable is a design document with a threat model (docs/design/credential-vault.md); the issues linked below build on it.
Why it matters
Today the only ways to give a bot a password are to paste it into the chat (it then goes to the model provider and into the chat history) or to let the bot type something the user already knows. Users who want a bot to log in to a site, call an API or use git over SSH need a path where the secret stays on their machine and the model only ever sees a name and a result. A vault also makes the existing protections visible and manageable instead of an API-only feature.
Current state (the foundation already exists)
This is not a green-field design. Verified against the code:
- Fill secrets.
crates/secret-store/src/fill.rsstores an owner-defined value underfill/<name>in the normal secret store, plus metadata (exact allowed web origins, allowed desktop programs, standing grants) infill-secrets.json. The metadata file holds names and allow-lists only, never values (FillSecretInfo: name, origins, programs,has_value,updated_at_ms). A name in a reserved namespace (composio,mcp, provider names, ...) is refused. - Model-facing side.
crates/builtin-tools/src/fill_secret.rsimplements thesecretparameter ofbrowser_fill,desktop_typeanddesktop_set_valueand thesecrets_listtool. The model names a secret; the value is read only inside the tool call, after approval and after the live origin check, held in memory, wiped on drop, and every string that leaves the module is scrubbed of the value and its encodings (Redactor,secret_variantsincrates/secret-store/src/redact.rs). Tests:crates/builtin-tools/src/fill_secret_tests.rs,crates/agent-core/src/tests/fill_secret.rs. - Owner-only management.
/v1/fill-secretsand/v1/fill-grants(crates/daemon-api/src/fill_routes.rs) are owner-only (crates/daemon-api/src/owner.rs), write an audit record before each change, and never return a value; seecrates/daemon-api/src/tests/fill_secrets.rs. - Approval and egress. Typing a secret asks every time, except for a standing grant for exactly "this secret on this origin" (
browser_fillonly today). A run that has read untrusted content still gets the ask (crates/agent-core/src/taint.rs,crates/permission-engine/src/egress.rs). - Storage backends. OS keychain or an encrypted file (
crates/secret-store/src/keyring_store.rs,file.rs: Argon2id key derivation, ChaCha20-Poly1305), chosen inopen.rs. - Documented behaviour and limits.
docs/guide/security.md, section "Secrets the assistant may type (fill secrets)". It says the Settings screen for these is "a separate, later change", and lists what is not covered (a password pasted into chat, memory not excluded from crash dumps or swap).
What is missing is everything around it: there is no UI (the desktop client has no calls to these routes), entries are a single string with no structure (no username/password pair, TOTP, SSH key), no per-bot scoping (the metadata has no bot field), autofill is "the model names the field" rather than field roles detected below the model, only management and standing-grant use are audited (not each approved use) and there is no viewer, there is no import or encrypted export, and the leak guarantees are tested for the current paths only.
Proposal and suggested approach
Deliverable 1, a design document (a PR adding docs/design/credential-vault.md) that decides:
- Scope and vocabulary. Does the vault evolve "fill secrets" (recommended: keep
fill/<name>andfill-secrets.jsoncompatible, add a versioned metadata schema and a forward-only migration) or replace them? One word for users: "vault entry". - Entry types and which fields are secret: login (site + username + password; is the username shown to the model?), API key, TOTP seed, SSH key, secure note. Card-like data (card numbers, CVV) is either explicitly out of scope or heavily caveated; recommend out of scope, with the reasoning.
- Rules per entry: which bots may use it, which exact origins and programs, ask every time versus remembered (and for how long), and what a "remembered" choice can never cover.
- How the value gets used without the model seeing it: the model gets a name and a result code; the daemon resolves the value after the approval and the live check. For TOTP, decide whether the code is typed only (recommended default) or may be returned to the model per entry, since a 30-second code is still a credential.
- Backend and unlock: keychain versus encrypted file, how a headless host unlocks (the passphrase environment variable today), what happens when the backend is unavailable.
- Threat model (a section of the same document). Assets, actors and trust boundaries: the model provider, a prompt-injected page or mail, a malicious skill or MCP server, a paired device, another local process, someone with the disk. Explicit non-goals (a process running as the user can already read what the user can read; this is not an OS sandbox) and a leak-channel checklist that every follow-up must prove: events and the SSE stream, run journal, logs, approval cards, screenshots and live view, accessibility trees and page snapshots, memory and knowledge stores, chat history, Telegram and other channels, MCP server mode, exports and backups, clipboard, crash dumps and swap.
- Compatibility, migration and rollback of existing
fill/entries. - How the work is sliced into the issues listed below, and which parts need a maintainer decision.
Acceptance criteria
- Design document merged, with the maintainers' agreement recorded in this issue and an explicit list of rejected alternatives.
- The threat model names every actor and channel above, says which are in and out of scope, and maps each in-scope channel to a test in the leak-test suite issue.
- Each follow-up issue below is updated to match the decisions (naming, schema, what is out of scope).
Out of scope
Implementation (see the linked issues), a browser extension, syncing the vault between devices or to a cloud, being a general-purpose password manager, and storing payment cards.
Breakdown (blocked until this design is agreed)
Each of these links back here and says what it is blocked on:
- #219 (L) Vault entry types and per-entry rules: login, API key, TOTP, SSH key, note
- #221 (M) Settings: manage vault entries per bot and per site (can start against the current routes)
- #222 (M) Vault audit log: record every use and show it in the app
- #223 (L) Autofill logins by field role in the browser and desktop apps, with scrubbing (needs #219)
- #224 (L) Vault import (CSV, Bitwarden, KeePass) and encrypted export (needs #219; coordinate with #197)
- #220 (M) Vault leak-test suite: prove values never reach the model, logs or screenshots (can start now; every other issue adds cases)
How to get started
Read docs/guide/security.md ("Secrets the assistant may type"), then crates/secret-store/src/fill.rs, crates/builtin-tools/src/fill_secret.rs and the tests named above. Comment here with an outline of the document and your answers to questions 1 to 5.
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 1
- Merge medio
- 6h 54m
- PR unite (30g)
- 152
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di emreocell/Praxi-Bot
-
area: desktop-ui enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Add an LLM provider presetApertaarea: daemon enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Contribute example skillsApertadocumentation enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
emreocell/Praxi-Bot#168 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di emreocell/Praxi-Bot
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
open-telemetry/weaver#1917 ·
I maintainer di solito rispondono entro 2 giorni
-
bug host P3 web
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jphacks/kz_2613#589 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation pkg:sdk project
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
priority middle
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
KATO-Hiro/AtCoderClans#13029 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
RustCrypto/formats#2544 ·
I maintainer di solito rispondono entro 1 giorno