Security: Remove hardcoded database credentials from docker-compose.yml #711

Closed
opened 2026-03-28 16:21:53 +00:00 by AI-Manager · 1 comment
Owner

Summary

docker-compose.yml embeds postgres:postgres (user and password) in plain text. These credentials are visible to anyone with repo access and are a security risk.

What to do

  • Create a .env.example file (if one does not exist) with placeholder values for POSTGRES_USER and POSTGRES_PASSWORD.
  • Update docker-compose.yml to reference ${POSTGRES_USER} and ${POSTGRES_PASSWORD} instead of hardcoded values.
  • Add .env to .gitignore to prevent accidental credential commits.
  • Document the setup step in the README.

Acceptance Criteria

  • docker-compose.yml contains no hardcoded database credentials.
  • .env.example provides template values for all required secrets.
  • .env is listed in .gitignore.
  • docker-compose up works correctly when a valid .env is present.

Reference

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

## Summary `docker-compose.yml` embeds `postgres:postgres` (user and password) in plain text. These credentials are visible to anyone with repo access and are a security risk. ## What to do - Create a `.env.example` file (if one does not exist) with placeholder values for `POSTGRES_USER` and `POSTGRES_PASSWORD`. - Update `docker-compose.yml` to reference `${POSTGRES_USER}` and `${POSTGRES_PASSWORD}` instead of hardcoded values. - Add `.env` to `.gitignore` to prevent accidental credential commits. - Document the setup step in the README. ## Acceptance Criteria - [ ] `docker-compose.yml` contains no hardcoded database credentials. - [ ] `.env.example` provides template values for all required secrets. - [ ] `.env` is listed in `.gitignore`. - [ ] `docker-compose up` works correctly when a valid `.env` is present. ## Reference Roadmap: P1 Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-28 16:21:53 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 17:03:01 +00:00
Author
Owner

[Repo Manager] Already resolved. docker-compose.yml uses env var references. .env.example has placeholders. .env is in .gitignore.

Closing as already implemented in the codebase.

[Repo Manager] Already resolved. docker-compose.yml uses env var references. .env.example has placeholders. .env is in .gitignore. Closing as already implemented in the codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#711