security: harden CI Docker Compose credentials #4210
+28
−3
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.
Refactored the
bamboo/docker-compose.ymlto replace hardcoded credentials with environment variable references. While these services are primarily used for testing, avoiding hardcoded passwords likepasswordortestpassis a prudent security measure.Changes
POSTGRES_PASSWORDto use${POSTGRES_PASSWORD:-password}.FTP_PASSWORDto use${FTP_PASSWORD:-testpass}andFTP_USERto use${FTP_USER:-testuser}.This approach maintains backward compatibility for local testing while enabling secure credential injection in more sensitive environments. It reduces the risk of default credentials being accidentally propagated into production-like setups.
Proof of Concept:
Unauthorized access to the Postgres or FTP containers would be trivial if they were exposed with these default settings. Transitioning to environment variables reinforces the principle of secure-by-default configuration.