forked from 0xWheatyz/SPARC
Security: remove plaintext database credentials from docker-compose.yml #1311
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?
Background
docker-compose.ymlembedspostgres:postgres(username and password) in plain text. Anyone with access to the repository can see the credentials, and they are the same defaults used in production if never rotated.What to do
POSTGRES_USER/POSTGRES_PASSWORDvalues indocker-compose.ymlwith variable references, e.g.${POSTGRES_USER}/${POSTGRES_PASSWORD}..env.examplewith safe placeholder values.README/ developer docs to explain that a.envfile is required before runningdocker compose up..envis in.gitignore.Acceptance criteria
docker-compose.ymlcontains no hardcoded passwords..env.exampleexists with documented placeholders..gitignoreexcludes.env.docker compose configrenders correctly when a valid.envis present.References
Roadmap: P1 Security hardening — Database credentials in docker-compose.yml.
Already resolved.
docker-compose.ymluses variable substitution (${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}) -- no plaintext credentials present.