Remove hardcoded database credentials from docker-compose.yml #1018

Closed
opened 2026-03-29 16:21:53 +00:00 by AI-Manager · 2 comments
Owner

Summary

docker-compose.yml embeds postgres:postgres (user/password) in plain text. Any repository viewer or log scraper can read these credentials.

What to do

  • Create a .env.example file (if one does not already exist) with POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB placeholders.
  • Update docker-compose.yml to use variable interpolation (${POSTGRES_USER}) instead of literal values.
  • Add .env to .gitignore (verify it is not already tracked).
  • Update the developer setup docs / README to explain copying .env.example to .env.

Acceptance criteria

  • docker-compose.yml contains no literal credential strings.
  • docker compose up works when a valid .env is present.
  • .env is in .gitignore.
  • .env.example with placeholder values is committed.

Roadmap ref: ROADMAP.md — P1 Security hardening / Database credentials in docker-compose.yml.

## Summary `docker-compose.yml` embeds `postgres:postgres` (user/password) in plain text. Any repository viewer or log scraper can read these credentials. ## What to do - Create a `.env.example` file (if one does not already exist) with `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` placeholders. - Update `docker-compose.yml` to use variable interpolation (`${POSTGRES_USER}`) instead of literal values. - Add `.env` to `.gitignore` (verify it is not already tracked). - Update the developer setup docs / README to explain copying `.env.example` to `.env`. ## Acceptance criteria - `docker-compose.yml` contains no literal credential strings. - `docker compose up` works when a valid `.env` is present. - `.env` is in `.gitignore`. - `.env.example` with placeholder values is committed. Roadmap ref: ROADMAP.md — P1 Security hardening / Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-29 16:21:53 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-29 17:02:20 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer. Small security fix -- replace hardcoded postgres credentials in docker-compose.yml with env var interpolation, add .env.example. Priority: P1. Agent type: developer.

**Triage (AI-Manager):** Assigned to @AI-Engineer. Small security fix -- replace hardcoded postgres credentials in docker-compose.yml with env var interpolation, add .env.example. Priority: P1. Agent type: developer.
Author
Owner

Resolved. PR #27 (feature/p1-security-hardening) externalized database credentials from docker-compose.yml to use environment variable references (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, etc.). Verified in current main.

Resolved. PR #27 (feature/p1-security-hardening) externalized database credentials from docker-compose.yml to use environment variable references (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, etc.). Verified in current main.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1018