fix(security): replace hardcoded DB_PASSWORD with env var in dev docker-compose configs (#43)#144
Merged
YaronZaki merged 3 commits intoJun 19, 2026
Conversation
…ral in devops/docker-compose.quantara.dev.yaml
…ral in devops/docker-compose.quantara.back.yaml
…ral in devops/docker-compose.quantara.dev-windows.yaml
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #43 — three docker-compose development files hardcoded
DB_PASSWORD=passwordandPOSTGRES_PASSWORD=passwordas literal strings. If a developer copied this pattern to production the database would have a known, guessable password. Inconsistency with the production config (which correctly uses${DB_PASSWORD}) also creates confusion.Changes
Replaced hardcoded
passwordwith${DB_PASSWORD:-password}in:devops/docker-compose.quantara.dev.yamlDB_PASSWORD=passwordDB_PASSWORD=${DB_PASSWORD:-password}devops/docker-compose.quantara.dev.yamlPOSTGRES_PASSWORD: passwordPOSTGRES_PASSWORD: ${DB_PASSWORD:-password}devops/docker-compose.quantara.back.yamldevops/docker-compose.quantara.dev-windows.yamlThe
:-passwordfallback means:passwordas before (zero friction for existing devs)DB_PASSWORDset in host environment → uses that value (enables teams to set stronger passwords)The
quantara/.env.devfile already containsDB_PASSWORD=passwordand was not changed.The CI workflow files (
.github/workflows/ci.yml,integration-tests.yml) were intentionally left unchanged — they already setDB_PASSWORD: passwordexplicitly as environment variables for the test runner.Test plan
docker compose -f devops/docker-compose.quantara.dev.yaml up -dstill works without any extra config (fallbackpasswordapplies)DB_PASSWORD=testpassin host env before compose-up correctly propagates to the containerCloses #43
🤖 Generated with Claude Code