Repository Public
1# SP Vault — security23SP Vault is a self-hosted, end-to-end encrypted password manager. This file states what is protected, how, what4is **not** protected, and what has and has not been verified. Design details: `docs/crypto-spec/SPV1.md`5(protocol), `THREAT_MODEL.md`, `docs/architecture/ADR.md`, `services/managed-secrets/THREAT_MODEL.md`.67## Guarantees (personal vault)89* The server stores ciphertext and public keys. Titles, URLs, usernames, passwords, notes, tags, TOTP seeds,10 attachments, file names and vault names are encrypted on the client with AES-256-GCM under keys the server11 never receives. Verified by tests that scan everything a client sends and everything the database and logs hold.12* There is no master password and no password-derived key: every key is 256-bit random. Device private keys are13 generated on the device (Secure Enclave on Apple hardware, non-extractable WebCrypto keys in browsers) and never leave it.14* A device joins an account only when an already trusted, unlocked device approves it after verifying a code the15 server cannot forge, or with the recovery key. A sign-in link, a QR code or the passkey alone enrol nothing.16* The recovery key is generated and shown on the client, once. The server holds only a hash of a value derived17 from it. **Nobody — including the operator — can recover a vault whose devices and recovery key are all lost.**18* Every record is bound to its vault, id, type, revision and key epoch; substitution, re-labelling, forged19 deletions and rollbacks below what a device already saw are detected and refused.2021## Explicit limits2223* **Web client**: a server (or anyone controlling TLS termination) that serves modified JavaScript can steal the24 vault of users who unlock it in a browser. CSP, Trusted Types and controlled deployments reduce accidental and25 third-party injection; they do not remove this trust. Use the native apps for the highest assurance.26* **Metadata**: listed in SPV1 §8 (counts, sizes in 256-byte buckets, timing, device labels, membership, IPs).27* **Compromised unlocked endpoint**: reads everything that device can decrypt. Revocation stops future access,28 not copies already taken — rekey the account and change the stored passwords.29* **Freshness**: a malicious server can withhold recent changes or delete data (SPV1 §7). Keep encrypted backups.30* **Clipboard, screenshots, other apps**: best effort only (see THREAT_MODEL T17).31* **Managed secrets (Connect / Agents)** are *not* zero-knowledge: the node can decrypt them, by design. They live32 in a separate process and store with a separate key, and the product labels them as such.33* **Sharing**: a recipient who has seen a secret keeps it; revocation and expiry stop future retrievals only.3435## Cryptography3637AES-256-GCM, HKDF-SHA256, HPKE (RFC 9180, DHKEM P-256), ECDSA P-256, SHA-256, HMAC-SHA256 — only through38WebCrypto, `@hpke/core`, Node `crypto` and Apple CryptoKit. No primitive is implemented in this repository.39Two independent implementations (TypeScript, Swift) are locked together by `packages/crypto-test-vectors`.4041## Verification status4243| Item | Status |44|---|---|45| Unit / property tests of the protocol (TypeScript) | passing — `pnpm test:unit` |46| Cross-language vectors (TypeScript ⇄ Swift) | see `docs/TEST_REPORT.md` |47| Integration tests on a real server + PostgreSQL (two devices, recovery, offline, conflicts, malicious server, sharing, rekey, backup, agents) | passing — `pnpm test:int` |48| API security tests (authn/z, IDOR, CSRF, replay, enumeration, brute force, fixation, fuzzing, log hygiene) | passing — `pnpm test:security` |49| Browser tests under the production CSP | see `docs/TEST_REPORT.md` |50| Real-device tests (Face ID / Touch ID, Keychain, AutoFill, passkeys) | **not done** — see `docs/TEST_REPORT.md` |51| Independent review of SPV1 and of both implementations | **not done — launch gate** |52| External penetration test | **not done — launch gate** |53| Restore drill from offsite backup | see `docs/operations/OPERATIONS.md` |5455Until the launch gates are closed, do not make SP Vault the only copy of credentials you cannot afford to lose56or leak: keep your current manager in parallel.5758## Supply chain5960Exact versions pinned (`save-exact`), lockfile with integrity hashes, install scripts disabled61(`ignore-scripts=true`), `pnpm audit --prod` and a CycloneDX SBOM in the release checklist, no third-party Swift62packages, no analytics or crash-reporting SDK in any client.6364## Reporting6566Report vulnerabilities privately to contact@spboucher.ai. Do not open public issues for security problems.67