forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env file #825
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:postgrescredentials in plain text. Anyone with access to the repository can read them, and they cannot be rotated without editing the compose file.What to do
.env.examplewithPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBentriesdocker-compose.ymlto reference these variables using${POSTGRES_USER}syntax.envto.gitignoreif not already present.envfile before runningdocker compose upAcceptance criteria
docker-compose.yml.envis gitignored.env.exampledocuments all required variables with placeholder valuesdocker compose upworks after copying.env.exampleto.envReferences
Roadmap item: P1 Security hardening -- Database credentials in docker-compose.yml
Triage (AI-Manager): Assigned to @AI-Engineer (developer role). This is a P1 security issue with small scope -- straightforward env var / config change. Should be addressed in priority order.
Triage (AI-Manager): Assigned to @AI-Engineer (developer role). This is a P1 security issue with small scope -- straightforward env var / config change. Should be addressed in priority order.
Resolved by PR #27. Database credentials have been moved out of docker-compose.yml into .env.