Skip to content

Hardening & Encryption at Rest

Microbase applies defense-in-depth security controls out of the box:

  • AES-256-GCM Secrets at Rest (ENCRYPTION_KEY): All database-stored secrets (SMTP password, S3 secret key, Redis URL, OAuth client secrets, Webhook tokens/secrets) are encrypted with enc:v1:... before writing to PostgreSQL.
  • Admin UI Cookie + CSRF Guard: Superuser sessions use HttpOnly; SameSite=Strict cookies (mb_admin_token) instead of localStorage, paired with X-Requested-With: Microbase CSRF verification on state-changing requests.
  • Anti-IP-Spoofing: Uses echo.ExtractIPDirect() by default; X-Forwarded-For is only trusted when the immediate peer matches your configured Trusted Proxy CIDRs.
  • SSRF Protection: Outgoing Webhook and Cron HTTP calls resolve DNS and block loopback, RFC1918 private networks, link-local (169.254.169.254), and IPv6 ULA targets by default.
  • Automated Vulnerability Scanning: CI runs govulncheck and npm audit --audit-level=high on every push and weekly schedule.