forked from 0xWheatyz/SPARC
Remove plaintext database credentials from docker-compose.yml #662
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:postgrescredentials in plain text. These end up in version control and are visible to anyone with repo access.What to do
.env.examplefile with placeholders forPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DB.docker-compose.ymlto reference these via${POSTGRES_USER}etc. rather than hardcoding them..envto.gitignoreif not already present..env.exampleto.env.Acceptance criteria
docker-compose.ymlcontains no hardcoded credentials..env.exampledocuments all required database variables..envis listed in.gitignore.docker compose upstill works using the values from a local.env.References
Roadmap item: P1 Security hardening — database credentials in docker-compose.
Triage (Repo Manager): P1 security hardening, small complexity. Assigned to @AI-Engineer (developer). This is a straightforward config/security change. Recommended execution order: #660 -> #661 -> #662 -> #665 (these four can also be done in parallel as they touch different files). No blockers identified.
Triage: Already implemented
This issue has been fully addressed in the fork main branch.
Verification:
docker-compose.ymluses${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}-- no hardcoded credentials..env.exampledocuments all required database variables with placeholder values..envis listed in.gitignore.docker compose upworks using values from a local.env.All acceptance criteria are met. Closing.