Security
What is defended, how, and where the limits are. TEVSEC Gate has not had an independent security audit yet; treat this page as a description of design and tests, not a certification.
| Area | What is in place |
|---|---|
| Passwords | scrypt (N=215, r=8, p=1) with a per-user salt and constant-time comparison; minimum length 10, common-password and name checks; logins for unknown emails do the same work as real ones. |
| Brute force | 5 failed attempts per email or IP in 15 minutes lock sign-in (HTTP 429), including the 2FA step; signups are rate limited per IP. |
| Local model | Document text goes only to loopback endpoints unless the operator opts in. Model output is strict-JSON validated, predicates normalised, injected output dropped, and every result is a proposal a human must accept. Calls are rate limited per user, capped at two concurrent requests and audited. |
| Email and SSO | Email confirmation and reset links use 256-bit single-use tokens stored hashed, carried in the URL fragment; requests for unknown addresses behave identically and are throttled. SSO uses authorization code with PKCE, a state bound to the starting browser, strict id_token validation (RS256/ES256 only, issuer, audience, expiry, nonce, verified email) and same-origin provider endpoints. |
| Two-factor | TOTP (RFC 6238) with replay protection; ten single-use recovery codes stored hashed; the TOTP secret is sealed with AES-256-GCM. |
| Sessions | 256-bit random tokens stored only as hashes; HttpOnly, SameSite=Strict, Secure and __Host- prefixed in production; 12 h idle and 7 d absolute expiry; per-device revocation; a password change ends other sessions. |
| CSRF | Per-session token header on every unsafe request, plus an Origin check. |
| Browser | Strict CSP (no inline script or style, no framing), HSTS, nosniff, no-store, no CORS. Claim text is rendered as text only, so stored XSS in memory content does not execute. |
| Authorization | Role checks on the server for every route; non-members receive 404 so workspaces cannot be enumerated. |
| API keys | 192-bit secrets shown once and stored as SHA-256; read or write scope, expiry, revocation; keys cannot reach admin or human-only endpoints. |
| Signing keys | Agents sign locally and never send private keys. Server-held workspace and member keys are sealed with AES-256-GCM under a master key; each blob is bound to its workspace and user, so swapping blobs fails authentication. |
| Ledger | Ed25519 signatures with domain separation, hash chain, Merkle checkpoints, replay rejection, ±10 minute window for API-submitted entries, strict schemas that reject unknown fields, trust policy enforced at write time and again on replay. |
| Outbound requests | Webhooks and source fetching accept public http(s) addresses only, pin the resolved IP against DNS rebinding, refuse redirects and cap response size. Webhook bodies are signed with HMAC-SHA256. |
| Audit | Administrative actions are written to a hash-chained log you can verify with ostivane cloud verify-audit. |
| Exports | CSV cells that start with =, +, - or @ are neutralised against formula injection. |
| Backups and metrics | Snapshots are consistent, hash-manifested and fully re-verified on restore; archives are written with mode 600 and never contain the master key. /metrics is off unless a token is set, uses constant-time token comparison and bounded labels. |
| Container | Runs as a non-root user with a read-only filesystem and all Linux capabilities dropped in the provided compose stack. |
| Threat | Defence | Residual risk |
|---|---|---|
| Someone edits or deletes stored memory | Hash chain, signatures and Merkle checkpoints make it evident; the red-team suite exercises tampering, deletion and history rewrite. | Tail truncation is only provable against a checkpoint stored outside the server. |
| Poisoned document or injected instructions in memory | Pattern scanner for overrides, role hijacks, exfiltration and invisible Unicode; recalled claims carry warnings for the host. | Heuristics miss novel phrasing. Treat recalled text as data. |
| Fake consensus (Sybil identities) | Trust only flows from the root; one vote per vouch cluster; alerts on bursts of untrusted supporters. | A compromised high-weight member still carries weight until revoked. |
| Stolen agent key | Revoke: weight drops to zero and later entries are rejected. | Entries before revocation remain valid history. |
| Stolen database file | Passwords hashed, signing keys and TOTP secrets sealed, API keys hashed. | Ledgers are not encrypted at rest; use disk encryption. |
| Compromised server | Agent-signed entries cannot be forged without agent keys; tampering is evident against external checkpoints. | Server-held member and workspace keys can be used by an attacker who also gets the master key. This custodial design is a conscious trade-off. |
| Credential stuffing, XSS, CSRF, SSRF | See controls above. | No independent penetration test yet. |
P7_MASTER_KEY_COMMAND) or a mounted secret (P7_MASTER_KEY_FILE), so it need not sit next to the data, but while the server runs it is held in its memory: sealing inside the HSM, so the key never leaves it, is not supported.Email security@tevsec.com with steps to reproduce. Please give us reasonable time to fix before disclosing, and do not access data that is not yours.