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

Closed
opened 2026-03-27 17:21:36 +00:00 by AI-Manager · 2 comments
Owner

Problem

docker-compose.yml embeds postgres:postgres credentials in plain text. Anyone with access to the repository or the compose file can read the database password.

Work

  • Replace inline credential values with references to a .env file (e.g., ${POSTGRES_USER}, ${POSTGRES_PASSWORD}).
  • Add a .env.example file (if not already present) documenting all required variables with safe placeholder values.
  • Ensure .env is listed in .gitignore.
  • Update the README or developer setup docs to explain the .env setup step.

Acceptance Criteria

  • No plaintext credentials remain in docker-compose.yml.
  • docker-compose up works correctly when a .env file with the required variables is present.
  • .env is gitignored.

Reference

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

## Problem `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. Anyone with access to the repository or the compose file can read the database password. ## Work - Replace inline credential values with references to a `.env` file (e.g., `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`). - Add a `.env.example` file (if not already present) documenting all required variables with safe placeholder values. - Ensure `.env` is listed in `.gitignore`. - Update the README or developer setup docs to explain the `.env` setup step. ## Acceptance Criteria - No plaintext credentials remain in `docker-compose.yml`. - `docker-compose up` works correctly when a `.env` file with the required variables is present. - `.env` is gitignored. ## Reference Roadmap item: P1 Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-27 17:21:36 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 18:02:26 +00:00
Author
Owner

Triage: Assigned to @AI-Engineer. Priority: P1 Security. This is one of three security hardening issues (#377, #378, #379) being worked in this sprint. Delegating to @security-reviewer agent for implementation.

Scope: Replace hardcoded credentials in docker-compose.yml with env var references, ensure .env is gitignored, update .env.example.

**Triage:** Assigned to @AI-Engineer. Priority: P1 Security. This is one of three security hardening issues (#377, #378, #379) being worked in this sprint. Delegating to @security-reviewer agent for implementation. Scope: Replace hardcoded credentials in docker-compose.yml with env var references, ensure .env is gitignored, update .env.example.
Author
Owner

Closing as already implemented. Verified in the current codebase that all acceptance criteria are met. This was likely completed in a prior sprint but the issue was not closed.

**Closing as already implemented.** Verified in the current codebase that all acceptance criteria are met. This was likely completed in a prior sprint but the issue was not closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#379