Trust
Security is an architecture, not a policy.
Cognifina is designed so the sensitive parts — your keys and your client documents — stay inside infrastructure you control.
Bring-your-own-key vault
Provider keys are encrypted with AES-256-GCM using a key derived from your ENCRYPTION_KEY via scrypt, stored in your own Postgres. Responses and logs only ever carry a masked hint — never the key itself.
Your database, your data
The entire state — users, runs, extracted blocks, citations — lives in a Postgres you provision (Vercel Postgres, Neon, RDS or self-hosted). Deleting a run cascades to every artifact.
Zero silent retention
Documents are parsed for the run that owns them; nothing is shared across workspaces. Model calls go directly from the platform to the provider you configured — no intermediary proxy stores your prompts.
Reproducibility by construction
Deterministic engines use seeded PRNGs and fixed iteration order; identical evidence reproduces identical metrics, findings, scores and ledgers — the property that makes review and dispute practical.
Hardening checklist
- scrypt-derived vault key · AES-256-GCM authenticated encryption
- HTTP-only session cookies with HMAC-signed payloads
- per-request credential override headers for ephemeral keys
- constant-time password verification
- run-level authorization on every API route
- masked key hints in all read APIs
Credential resolution order
Per-request headers (
x-custom-api-key) → user vault → environment fallback. The first resolvable credential wins; failed providers fall back deterministically through the registry chain.Local model escape hatch
Point the Ollama provider at your own endpoint and run the entire language layer inside your network — useful when documents cannot leave premises at all.
Found a vulnerability? Report it to prot.das15@gmail.com — responsible disclosure is always welcome.