forked from 0xWheatyz/SPARC
Remove plain-text database credentials from docker-compose.yml #1377
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
Roadmap item: P1 Security hardening — Database credentials in docker-compose.yml
docker-compose.ymlembedsPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. These values are committed to the repository and used verbatim in any environment that runs Compose, including CI and staging.Task
.env.examplefile documenting all required environment variables includingPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DB.docker-compose.ymlto reference these via${POSTGRES_PASSWORD}substitution syntax..envto.gitignore(if not already present)..envfrom.env.example.Acceptance Criteria
docker-compose.ymlcontains no hardcoded credential values.docker-compose upstill works when a.envfile with the variables is present..envis listed in.gitignore..env.exampleis committed and documents all required variables.Reference
See ROADMAP.md § P1 Security hardening.
Resolved by PR #27 (merged). All database credentials in
docker-compose.ymlnow use environment variable interpolation (${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}). No plain-text credentials remain.