-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Description: Production/test API keys (Razorpay key_id: rzp_test_BXNSan3NdLPrPa, key_secret: jQLMopwxI1FrtqnrHg3j9e3R) and secret keys (Flask SECRET_KEY, JWT_SECRET_KEY) are hardcoded in backend/config.py. These appear in test files too. This exposes the app to credential theft via git commits or repo access, violating security best practices.
Steps to Fix:
- Create .env file in backend/ with RAZORPAY_KEY_ID=your_prod_key, RAZORPAY_KEY_SECRET=your_prod_secret, SECRET_KEY=generate_strong_key, JWT_SECRET_KEY=generate_strong_jwt_key.
- Update config.py to use os.getenv() exclusively (remove fallback hardcoded values).
- Add .env to .gitignore.
- Rotate all exposed keys immediately via Razorpay dashboard.
- Use python-dotenv (add to requirements.txt) and load in app factory.
- Scan repo with git log -p | grep -i razorpay to check commit history.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels