explanation security-reviewerdeployer

OpenGov isolates public traffic, identity administration, background scanning, and persistent secrets across clear runtime boundaries. Each boundary below names what the platform enforces and what the deployment operator owns.

Network and container boundaries

BoundaryWhat the platform enforcesWhat the operator owns
Public ingress vs containersZero host-published ports in docker-compose.yml. Reverse proxy routes 80 and 443 only.Terminate TLS with valid certificates and set OPENGOV_TRUSTED_PROXIES.
Login admin consoleTraefik labels refuse /admin on login.<base> with HTTP 403.Reach admin console only through an authenticated SSH tunnel.
Virus scanner isolationclamav runs with network_mode: none and reads a Unix socket only.Place the signature rule file on the host and monitor freshclam updates.
Internal metrics listenersApp and worker bind :9100 internally. The SPA router excludes /metrics.Restrict Docker network access so external callers never reach :9100.

Identity and request boundaries

BoundaryWhat the platform enforces
Dual-realm separationStaff use realm opengov. Applicants use opengov-applicants with separate issuer and audience checks.
Bearer-only API authAPIs accept OIDC bearer tokens only and reject cookie-based authentication.
Pre-auth body ceilingRequestBodyCeiling rejects oversized bodies (413) before body read or token checks.
Strict table ownershipStatic CI gate (table_access_guard.py) blocks cross-module SQL table queries.

Secret and key custody boundaries

Secrets in deployments/<code>/secrets.env are SOPS-encrypted with age keys. At provisioning time, Coolify-tier operational secrets go to the deployment control plane. Out-of-band KEK-tier keys (OPENGOV_ENCRYPTION_KEY, OPENGOV_VAULT_KEK_V*, OPENGOV_ANON_HASH_SALT, OPENGOV_WM_BLIND_INDEX_KEY) never enter Coolify or database backups. See Environment Variables Reference for every variable’s tier.