fix: remove hardcoded PostgreSQL credentials from docker-compose.yml#1972
Open
namann5 wants to merge 1 commit into
Open
fix: remove hardcoded PostgreSQL credentials from docker-compose.yml#1972namann5 wants to merge 1 commit into
namann5 wants to merge 1 commit into
Conversation
The docker-compose.yml had POSTGRES_USER and POSTGRES_PASSWORD hardcoded as 'secuscan', which is a critical security issue in any deployment where the PostgreSQL port is exposed beyond localhost. Changes: - Replace hardcoded credentials with environment variable references that must be set at deploy time (SECUSCAN_POSTGRES_USER, SECUSCAN_POSTGRES_PASSWORD, SECUSCAN_POSTGRES_DB) - Add sensible defaults for user and database name - Use mandatory-variable syntax for the password so docker-compose refuses to start without it - Update the api service's SECUSCAN_POSTGRES_DSN to use the same environment variable references - Document the new variables in .env.example with a strong-password generation hint
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Closes #1970
Summary
Removes hardcoded default PostgreSQL credentials from docker-compose.yml, replacing them with mandatory environment variables that must be set at deploy time.
Changes
Why
Hardcoded credentials (secuscan/secuscan) allow trivial database compromise in any deployment where the PostgreSQL port is reachable — CVSS 9.8 (Critical).