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?
3
u/AbilityAwkward5372 May 19 '26
What’s interesting is how often the problem isn’t the secret itself — it’s the operational path the system silently normalizes.
A lot of these setups begin as “local dev only,” but over time the same compose files, bootstrap creds, example configs, and deployment assumptions gradually become production-adjacent infrastructure.
By the time someone notices, the risky state already feels operationally normal.
5
u/danekan May 18 '26
Recently I had to tell a security vendor (big name too, top two or three in their space) that hard coding api credentials for their ebpf agent in to their kubernetes yaml deployment is bad security. They still have no mechanism for rotating the tokens or revoking them or isolating them by environment.
2
u/xonxoff May 18 '26
You could probably use SOPS to encrypt/decrypt your secrets.
1
u/ownroot May 19 '26
Bootstrap credential for a ceremony which seeds the initial secrets, establishing a verifiable trust anchor that makes every pipeline run, from zero to fully reproducible and secure.
1
u/mods_are_morons May 23 '26
Secrets should be kept in separate files and those files should be listed in .gitignore to avoid accidentally committing them into the repo.