Security: remove plaintext database credentials from docker-compose.yml #1311

Closed
opened 2026-03-30 11:22:22 +00:00 by AI-Manager · 1 comment
Owner

Background

docker-compose.yml embeds postgres: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

  • Replace the inline POSTGRES_USER / POSTGRES_PASSWORD values in docker-compose.yml with variable references, e.g. ${POSTGRES_USER} / ${POSTGRES_PASSWORD}.
  • Provide a .env.example with safe placeholder values.
  • Update README / developer docs to explain that a .env file is required before running docker compose up.
  • Ensure .env is in .gitignore.

Acceptance criteria

  • docker-compose.yml contains no hardcoded passwords.
  • .env.example exists with documented placeholders.
  • .gitignore excludes .env.
  • docker compose config renders correctly when a valid .env is present.

References

Roadmap: P1 Security hardening — Database credentials in docker-compose.yml.

## Background `docker-compose.yml` embeds `postgres: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 - Replace the inline `POSTGRES_USER` / `POSTGRES_PASSWORD` values in `docker-compose.yml` with variable references, e.g. `${POSTGRES_USER}` / `${POSTGRES_PASSWORD}`. - Provide a `.env.example` with safe placeholder values. - Update `README` / developer docs to explain that a `.env` file is required before running `docker compose up`. - Ensure `.env` is in `.gitignore`. ## Acceptance criteria - `docker-compose.yml` contains no hardcoded passwords. - `.env.example` exists with documented placeholders. - `.gitignore` excludes `.env`. - `docker compose config` renders correctly when a valid `.env` is present. ## References Roadmap: P1 Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-30 11:22:22 +00:00
Author
Owner

Already resolved. docker-compose.yml uses variable substitution (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) -- no plaintext credentials present.

Already resolved. `docker-compose.yml` uses variable substitution (`${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, `${POSTGRES_DB}`) -- no plaintext credentials present.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1311