Fix: Add missing SECRET_KEY and ALTCHA_HMAC_KEY to docker.env#2124
Fix: Add missing SECRET_KEY and ALTCHA_HMAC_KEY to docker.env#2124paarthbhatt wants to merge 2 commits intoaboutcode-org:mainfrom
Conversation
2fca192 to
d98177b
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses a critical issue where the Docker Compose setup fails locally due to missing required environment variables SECRET_KEY and ALTCHA_HMAC_KEY in the docker.env file. The PR adds these variables with default values of "secret" to enable the Docker environment to start successfully out of the box.
Changes:
- Added
SECRET_KEY=secretto docker.env - Added
ALTCHA_HMAC_KEY=secretto docker.env
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docker.env
Outdated
| SECRET_KEY=secret | ||
| ALTCHA_HMAC_KEY=secret |
There was a problem hiding this comment.
The docker.env file now contains security-sensitive default values (SECRET_KEY and ALTCHA_HMAC_KEY) but lacks a warning comment about not using these values in production. The SECRET_KEY is critical for Django's cryptographic signing and session management. Consider adding a comment at the top of the file warning users to generate proper secret keys for production use, similar to the SECURITY WARNING comments in vulnerablecode/settings.py. This would help prevent accidental use of weak default values in production environments.
Also added a security warning comment to avoid using default credentials in production. Signed-off-by: Parth Bhatt <paarthbhatt37@gmail.com>
64848a2 to
266e300
Compare
|
@paarthbhatt did you even put in the basic effort to go through our README? There are clear instructions on how to run VulnerableCode in docker see https://github.com/aboutcode-org/vulnerablecode?tab=readme-ov-file#run-with-docker. You are supposed to run |
Using the docker compose setup fails locally because
SECRET_KEYandALTCHA_HMAC_KEYare missing fromdocker.env.This PR adds default values ("secret") to
docker.envto ensure the local docker environment starts correctly out of the box.Note: Line ending fixes are being handled in separate PR #2114.