exo

SECURITY

How Exo handles security.
Only what is true today.

Every live claim below names the file or test in our repository that proves it. A test fails the build if that evidence is removed. Work that is not finished is marked in progress.

Live today · 5

  • Live

    Exo runs no third-party analytics, tracking, session replay or tag managers.

    No analytics, replay or tag-manager SDK is in our dependencies or our source, and a test fails the build if one is added.

    • package.json: Direct dependencies: no analytics or tracking SDK.
    • pnpm-lock.yaml: Full dependency tree: no analytics or tracking SDK.
    • tests/int/security-claims.int.spec.ts › “finds no analytics, tracking, session replay or tag-manager SDK”: Scans package.json, the lockfile, src and convex for known SDKs and loader hosts.
  • Live

    Sign-in uses PKCE, and every session token is RS256-signed and checked against our own Key signing keys.

    Imprint issues the tokens and Key publishes their JWKS. Each protected request checks the signature, issuer, audience and expiry, and sessions live in HttpOnly cookies that page scripts cannot read.

    • src/app/(frontend)/auth/start/route.ts: Starts the authorization-code flow with an S256 PKCE challenge.
    • convex/exoId.ts: Imprint requires S256 and burns a code after one attempt.
    • src/platform/identity/exo-id-session.ts: Verifies RS256 against the Key JWKS; HttpOnly cookie options.
    • docs/security/auth-exo-id.md: Imprint authentication boundary.
    • tests/int/exo-id-session.int.spec.ts › “round-trips PKCE state and produces an S256 challenge”: PKCE on EXO’s own sign-in.
    • tests/int/exo-id-session.int.spec.ts › “rejects another audience, an expired token, and malformed input”: Token verification fails closed.
    • tests/int/exo-id-v1.int.spec.ts › “rejects a wrong PKCE verifier and burns the code”: A failed PKCE guess cannot be retried.
  • Live

    Every dependency is pinned in a committed lockfile, and every build installs with a frozen lockfile.

    Only four packages (esbuild, sharp, unrs-resolver and workerd) may run install scripts; every other package is blocked from running code at install. Our CI actions are pinned to exact commits.

    • pnpm-lock.yaml: Committed lockfile.
    • Dockerfile: Deploy build: pnpm install --frozen-lockfile.
    • .github/workflows/ci.yml: CI: pnpm install --frozen-lockfile.
    • pnpm-workspace.yaml: allowBuilds: the install-script allowlist.
    • tests/int/security-claims.int.spec.ts › “installs from the frozen lockfile and allowlists install scripts”: Re-checks the lockfile, frozen installs, the allowlist and pinned actions.
  • Live

    Every deploy build runs a secret scan and a vulnerability scan before it can ship.

    Gitleaks and OSV-Scanner run inside the Docker build after type checks, lint and tests. A leaked secret, or a high or critical vulnerability with a known fix, fails the build and the previous version stays live. A documented break-glass build setting can make the scan advisory for a single deploy.

    • Dockerfile: Gate stage: exo-simulator run --gate, then security --require-tools.
    • exo-simulator.config.json: Security scan enabled and enforcing (advisory: false).
    • tests/int/exo-simulator-security.int.spec.ts › “enforces gitleaks and osv but only warns on Semgrep”: What blocks and what warns.
    • tests/int/exo-simulator-security.int.spec.ts › “keeps the runtime image lean and makes it depend on a passed gate before the build”: The image cannot build without a passed gate.
  • Live

    Every page is served over HSTS, and Exo’s own pages refuse framing by other sites and MIME sniffing.

    Strict-Transport-Security (one year, subdomains included), X-Content-Type-Options nosniff and a strict-origin referrer policy are set in the Next.js config. X-Frame-Options SAMEORIGIN is set on each of Exo’s own pages by the request proxy, alongside the Content Security Policy. The Imprint sign-in pages (/id/*) are never framed by anyone: they send an enforced frame-ancestors 'none' and X-Frame-Options DENY.

    • src/security/headers.ts: Static header values (HSTS, nosniff, referrer policy).
    • next.config.ts: Wires the static header rules into every response.
    • src/security/csp.ts: X-Frame-Options: SAMEORIGIN while the CSP is report-only, DENY once it enforces; always DENY, with an enforced frame-ancestors 'none', on /id/*.
    • src/proxy.ts: Sets the CSP and X-Frame-Options on every Exo-owned page.
    • tests/int/security-headers.int.spec.ts › “sets the exact security defaults, including a report-only CSP”: Exact static header values.
    • tests/int/security-headers.int.spec.ts › “keeps SAMEORIGIN outside /id and DENY on /id, never both on one path”: The proxy sends X-Frame-Options SAMEORIGIN on Exo pages.

In progress · 4

  • In progress

    Bitwarden secret loading: live on staging, production in progress.

    On staging, Exo loads its server secrets from our own Bitwarden Secrets Manager project into memory at startup. The Bitwarden token on the host is a read-only machine account whose value is set in the hosting dashboard, never in the Blueprint, and Simulator fails the build if a secret value appears in the Blueprint. One staging secret, the gateway client secret, still sits in the host environment until it moves. Production does not load from Bitwarden yet and still reads its secrets from the host environment. A few keys used only inside Convex, for email sending and sign-in, live in the Convex environment.

    • src/lib/exo-secure/bitwarden.mjs: Bitwarden loader: reads secrets through the official Bitwarden SDK (@bitwarden/sdk-wasm) into memory.
    • src/lib/exo-secure/index.ts: EXO_SECURE_SOURCE=auto uses Bitwarden when BWS_ACCESS_TOKEN is set; outside production it keeps, and names, a platform secret Bitwarden lacks.
    • src/instrumentation.ts: Runs the loader once, before the server takes traffic.
    • render.yaml: exo-staging: EXO_SECURE_SOURCE=auto and BWS_ACCESS_TOKEN (sync: false, no value in the file). exo-production declares no BWS_ACCESS_TOKEN yet.
    • tests/int/exo-secure-bitwarden.int.spec.ts › “loads manifest secrets by key name into memory, never into process.env”: Values never land in process.env.
    • tests/int/exo-secure-bitwarden.int.spec.ts › “auto prefers Bitwarden when BWS_ACCESS_TOKEN is set”: The staging setting picks Bitwarden.
    • tests/int/exo-secure-bitwarden.int.spec.ts › “outside production keeps a secret Bitwarden lacks from platform env, and names it”: Why one staging secret can still come from the host.
    • tests/int/exo-simulator-render-blueprint.int.spec.ts › “fails the gate on a secret value and never prints it”: Simulator render-blueprint check blocks a secret in render.yaml.
    • Tracked in the production move to Bitwarden (docs/runbooks/render-secrets-to-bitwarden.md).
  • In progress

    Every vendor Exo uses is listed in a trust register, and a third-party service we do not trust is not used.

    The register records what each vendor does for Exo, what data it sees and why we trust it. It is written and in review; it is not on staging yet.

    • docs/security/vendor-register.md: Lands with PR #257.
    • Tracked in PR #257.
  • In progress

    A strict, enforced Content Security Policy on every Exo page.

    Exo’s own pages now send a strict, nonce-based policy in report-only mode, which reports problems but blocks nothing. The one part already enforced is framing on the Imprint sign-in pages (/id/*), which refuse every frame. Switching the full policy to enforce is a separate step that has not happened yet.

    • src/security/csp.ts: Strict nonce-based policy; report-only unless EXO_CSP_MODE=enforce.
    • docs/security/exo-csp.md: The policy and its rollout flag.
    • Tracked in the EXO_CSP_MODE rollout (docs/security/exo-csp.md).
  • In progress

    An automated Simulator check that fails a release when a page loads JavaScript from another domain.

    The check and its declared exceptions for sandboxed frames are written and in review; they do not run on staging yet.

    • Tracked in PR #257.