Skip to content

Cryptographic Threat Model & Hardening ​

ShellGuard's security model addresses modern web vault threats and adversarial server compromise scenarios.


🛡️ Threat Mitigation Matrix ​

Threat IDThreat ScenarioArchitectural Mitigation
T1: Server DB ExfiltrationAn attacker steals data/db.sqlite from the host filesystem.Secrets remain unbreakable AES-GCM-256 ciphertexts. If DB_ENCRYPTION_KEY is active, metadata and raw database pages are also fully encrypted.
T2: Metadata InferenceAn attacker inspects item titles or URLs to profile targets.Per-Row Metadata Encryption (Layer 2) encrypts titles, URLs, and notes in-place on the database.
T3: Admin AbuseMalicious holder of ADMIN_TOKEN tries to exfiltrate passwords.The /superlobster panel uses a strict metadata response model. Passwords and secret blobs are never returned in admin API routes.
T4: Backup ExfiltrationAttacker calls an API to download the database file.Zero download endpoints by design. All backup snapshots are written server-side to DATA_DIR/backups/. Restorations are offline-only file swaps.
T5: In-Memory LeakageLong-running browser session leaves keys vulnerable to XSS.Auto-Lock Inactivity Retractor wipes decrypted state from memory after configurable idle timeout.
T6: Brute Force AttacksAttacker attempts rapid login or admin guessing.Dedicated rate limiters (5 attempts / 10 min on admin auth, 10 attempts / 15 min with skip-successful-requests on user token exchange).

🔒 OWASP Top 10 Coverage ​

  • A01: Broken Access Control: Strict ownership scoping (WHERE owner_uuid = ?) verified across all CRUD routes via automated security test gates.
  • A02: Cryptographic Failures: Standardized Web Crypto API + Node.js native crypto.createCipheriv with random 96-bit IVs and unique HKDF salt bindings.
  • A03: Injection: 100% parameterized SQLite prepared statements with strict Zod runtime schema validation.
  • A04: Insecure Design: Zero-knowledge mathematics render the server fundamentally incapable of revealing secrets.

The Auditor's Addendum (Phase 24) ​

For forensic and operational clarity, the following runtime realities are explicitly declared:

  • In-process rate limiting: The application utilizes in-memory rate limiters. A process restart (or container recreation) resets all limits to zero. Multi-instance or clustered deployments share no in-memory state; rate limits apply strictly per-node unless an external layer (like Redis or an L7 proxy) is introduced.
  • Per-key LRU eviction: The in-memory cache for agent key rate limits has a maximum capacity. If the cache exceeds this capacity, older key entries are evicted via Least Recently Used (LRU) policy. Evicted keys fall back safely to SQLite database lookups upon their next request, ensuring no bypass or crash occurs, though throughput drops marginally.
  • Redaction-regex coverage: Our audit logging mechanism utilizes strict regex patterns to redact sensitive substrings before they hit the audit.sqlite file. Tokens (api-), identities (hu-), and agent keys (lb-) are blanket redacted, replacing the sensitive key material with [REDACTED].
  • PBKDF2 iteration count: Custom passphrase exports and derivation flows use exactly 600,000 iterations of PBKDF2-HMAC-SHA256, strictly matching the OWASP recommended iteration standard for password hashing.

Sovereign Zero-Knowledge Secrets Vault. Released under AGPL-3.0. • Privacy Policy