chore(security): rotate brain_app postgres password — leaked in pre-fix pod logs #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The original
cmd/server/main.go"redaction" for theBRAIN_PG_DSNlog line was wrong — it sliced up to@, which is after the password in a Postgres URL, so the password landed in the structured log line of the ingestion pod under image7a13c756...on 2026-05-18 → 2026-05-19.Fixed in
4af10364viaurl.URL.Redacted()(now printsxxxxx). But the old log lines remain inkubectl logs --previoushistory and any sink the cluster logs are shipped to until that retention rolls off (typically 7–14 days for container runtime; longer if logs are shipped to a SIEM).Action
Rotate
brain_apppostgres password end-to-end:umask 077 && openssl rand -hex 24 > /tmp/brain_app_pg.pwd\if :role_exists ALTER ROLE ... WITH PASSWORD)::'password'does its own quoting.)secrets-revisiononingestion-deployment.yamlto roll the pod.rm /tmp/brain_app_pg.pwdAcceptance criteria
brain_apppassword generated and stored only in SOPSbrain hybrid retrieval enabledline + no auth errors)/tmp/brain_app_pg.pwddeletedkubectl delete podonce more after retention concern easesSeverity
Low — the leak was internal-only (kubectl logs require cluster admin), and the affected DB sits behind Tailscale. Worth doing as hygiene, not urgent.