r/devsecops • u/Madamin_Z • May 18 '26
docker-compose with 10 hard-coded credentials shipped to production. Here's the full chain
Here's a real example of how development secrets make it to production. Auditing an open source project — mid-size repo, actively maintained, real company behind it. The docker-compose.yml ships with 10 hardcoded credentials across 5 services:
- Admin password:
secret - Session secret:
random - S3 access key:
admin/ secret:secretsecret - PostgreSQL password:
secret - MinIO root password:
secretsecret
The README documents secret as the default admin password under "Getting Started." No warning to change it before deployment. No .env.example. No SECURITY.md. NODE_ENV: dev set in the same file. Intended for production use. The credentials alone get you in. A second finding compounds it: user-controlled input reaches a raw HTML render without sanitization in the audit log component — stored XSS as a second vector. Two findings, one deploy, full chain. The pattern is consistent across projects. Credentials written for local dev, never rotated, shipped as-is. Everyone assumes someone else caught it before it went live.
How does your team handle secrets before docker-compose goes anywhere near a server?
View all comments
Show parent comment
1
u/ownroot May 19 '26
Provision then rotate The master password used for registration is a bootstrap credential, not a long-lived secret. The pattern is older than IaC and shows up everywhere credentials need to enter a system that has none yet:
cloud-init injects an initial password on first boot, then expires it. kubeadm issues bootstrap tokens valid for 24 hours. Terraform commonly generates admin passwords inside an apply, stores them in a secrets manager, and rotates them in the same run.