Summary of What Needs to be Done:
The SECRET_KEY setting in backend/app/core/config.py accepts empty strings without raising a validation error. If the .env file contains SECRET_KEY= (empty value), pydantic-settings silently accepts it and the app starts with an insecure key, allowing trivial JWT forgery.
Changes that Need to be Made:
- backend/app/core/config.py: Add a pydantic @field_validator on SECRET_KEY that raises ValueError if the value is empty or shorter than 32 characters. Provide a clear error message: generate one with: openssl rand -hex 32
Impact that it would Provide:
- Fails fast and loudly if SECRET_KEY is misconfigured
- Prevents silent insecurity in production deployments
- Aligns with the principle of secure defaults
Note: Please assign this issue to the tmdeveloper007 account.
Summary of What Needs to be Done:
The SECRET_KEY setting in backend/app/core/config.py accepts empty strings without raising a validation error. If the .env file contains SECRET_KEY= (empty value), pydantic-settings silently accepts it and the app starts with an insecure key, allowing trivial JWT forgery.
Changes that Need to be Made:
Impact that it would Provide:
Note: Please assign this issue to the
tmdeveloper007account.