The file coolify.backend.minimal.env was committed to git with real secret
values. It has now been removed from tracking and added to .gitignore, but
the values still exist in git history and must be treated as compromised.
Rotate the live secrets below, then redeploy. Removing the file does not undo the exposure.
| Leaked value | Used by code? | Action |
|---|---|---|
DB_PASSWORD |
✅ yes | Change the Postgres role password; update DATABASE_URL. See the |
STAGING_REPAIR_TOKEN |
✅ yes (routes/staging.ts) |
Regenerate: openssl rand -hex 32. |
JWT_SECRET |
❌ no refs | Dead config — auth uses opaque DB sessions, not JWT. No rotation needed; just stop setting it. |
SESSION_SECRET |
❌ no refs | Dead config. No rotation needed. |
ENCRYPTION_KEY |
❌ no refs | Dead — the code reads PII_ENCRYPTION_KEY, not ENCRYPTION_KEY. No rotation needed. |
(Duitku, Midtrans and DOKU have since been removed; the only gateway is Mayar. Treat any committed DOKU_SECRET_KEY as compromised and revoke it in the DOKU Back Office. MAYAR_API_KEY and MAYAR_WEBHOOK_TOKEN are backend-only secrets: if either leaks, create a new API key / Web Token in the Mayar dashboard, update Coolify, and re-run node scripts/mayar-connect.mjs — see docs/engineering/MAYAR_INTEGRATION_GUIDE.md.)
⚠️ DB password ↔ PII key coupling.lib/encryption.tsderives the affiliate payout/bank-account (PII) encryption key fromPII_ENCRYPTION_KEY, falling back toDATABASE_URLwhen unset. In the current configPII_ENCRYPTION_KEYis unset, so rotatingDB_PASSWORDchanges the PII key and makes existing encrypted PII undecryptable. Before rotating DB creds: setPII_ENCRYPTION_KEYto the currentDATABASE_URLvalue (pinning the key), deploy, then rotate the DB password.
Rotation is the real fix. If you also want to scrub the values from history
(e.g. before open-sourcing), rewrite history with
git filter-repo:
git filter-repo --invert-paths --path coolify.backend.minimal.env --path coolify.frontend.minimal.env
git push --force-with-lease # coordinate with all collaborators first- Only
*.exampletemplates are committed..gitignorenow blocks*.minimal.env,.env,.env.*,*.bak,*.patch.ts,*.orig. - Generate secrets with
openssl rand— never hand-pick or reuse across envs. - Real values live in the deploy platform (Coolify) env config, not in the repo.
Email kaffeposapp@gmail.com. Please do not open public issues for security reports.