forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #1195
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?
Context
docker-compose.ymlembedsPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. Anyone who clones the repository has these credentials, and they are likely reused in deployments.Roadmap reference: ROADMAP.md > P1 > Security hardening > Database credentials in docker-compose.yml
What to do
docker-compose.ymlwith variable references (e.g.,${POSTGRES_PASSWORD})..env.examplefile with placeholder values and instructions..envis already in.gitignore; add it if not..env.exampleto.env.Acceptance criteria
docker-compose.ymlcontains no hardcoded password strings.docker-compose upworks correctly when.envis populated from.env.example..envis listed in.gitignore.This issue has been resolved on main.
docker-compose.ymluses environment variable substitution (${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}) instead of hardcoded credentials. Closing as complete.