If you discover a security vulnerability, please email security@flipthiscrypto.com instead of using the issue tracker.
- NEVER commit .env files to version control
- Always use
.env.exampleto document required variables - In production, set all sensitive values via environment variables or secrets management
- Rotate
FLASK_SECRET_KEYregularly in production
- Service account keys must be kept in
.env(ignored by git) - API keys should be restricted to specific Firebase services
- Use Firebase Security Rules to limit access
- Always set
FLASK_ENV=productionin production - Set
FLASK_DEBUG=Falsein production - Use HTTPS only in production
- Enable
SESSION_COOKIE_SECUREandSESSION_COOKIE_HTTPONLY - Implement rate limiting on API endpoints
- Use a production WSGI server (gunicorn, uwsgi, etc.) not Flask dev server
- Keep dependencies updated with security patches
- Regularly run
pip-auditto check for known vulnerabilities - Use pinned versions in requirements.txt for production
Firebase Hosting is configured with strict CSP headers:
default-src 'self'restricts all content to same origin- External resources limited to Firebase domains only
- Inline scripts evaluated only from trusted sources
- Frame embedding blocked entirely
❌ Hardcoded API endpoints, ngrok URLs, or tunnels in code
❌ Exposing service account keys in repositories
❌ Using Flask_DEBUG=True in production
❌ Committing .env files with secrets
❌ Making API calls without HTTPS in production
❌ Allowing cross-origin requests from *
- All environment variables are documented in
.env.example - No
.env,.key, orsecretsfiles are committed - Dependencies are updated and audited (
pip-audit) - Security headers are enabled in production config
- HTTPS is enforced for all API calls
- Rate limiting is configured for API endpoints
- Session cookies are marked Secure + HttpOnly + SameSite=Strict
- Firebase rules have been reviewed for proper access control
- No sensitive data is logged (API keys, tokens, passwords)
- Error messages don't expose system information
Last Updated: 2026-02-26