NEVER commit actual credentials to Git!
This repository uses .env files for sensitive configuration. These files are:
- β
Listed in
.gitignore - β Never committed to the repository
- β Only placeholders shown in documentation
-
Copy the example file:
cp backend/.env.example backend/.env
-
Replace ALL placeholder values:
<username>β Your MongoDB username<password>β Your MongoDB password<cluster>β Your MongoDB cluster nameGENERATE_RANDOM_SECRET_HEREβ Use:python -c "import secrets; print(secrets.token_hex(32))"
-
Verify
.envis not tracked:git status # Should NOT show .env files
If you discover a security vulnerability, please:
- DO NOT create a public GitHub issue
- Email the repository owner directly
- Include detailed information about the vulnerability
- Allow time for the issue to be addressed before public disclosure
- Use JWT tokens for authentication
- Hash all passwords with bcrypt
- Validate and sanitize all user inputs
- Use CORS protection
- Keep dependencies updated
- Follow OWASP security guidelines
- Never commit
.envfiles - Never commit API keys or secrets
- Never use default/example credentials in production
- Never share your MongoDB connection string publicly
- Never disable security features in production
- Create database users with minimal required permissions
- Use strong, unique passwords
- Whitelist only necessary IP addresses
- Enable two-factor authentication on your Atlas account
- Rotate credentials regularly
Generate secure random secrets:
import secrets
print(secrets.token_hex(32)) # 64-character hex string- Use test keys during development
- Use live keys only in production
- Rotate keys if compromised
- Monitor usage for suspicious activity
- Set up alerts for unusual API usage
Before deploying:
- All
.envfiles are in.gitignore - No credentials in source code
- No credentials in documentation
- Strong JWT secrets configured
- MongoDB Atlas IP whitelist configured
- All dependencies updated
- HTTPS enabled in production
- CORS properly configured
- Input validation enabled
- Error messages don't expose sensitive info
- Update dependencies monthly:
pip install -r requirements.txt --upgrade - Review GitHub security alerts
- Rotate credentials quarterly
- Audit access logs
- Review user permissions
For security concerns, contact the repository owner through GitHub.
Last Updated: November 9, 2025