This document outlines the security measures implemented in Shelldo and best practices for deployment.
.env- Contains actual secrets and keys.env.local.env.production.local- Any files with real OAuth secrets
.env.example- Template with placeholder values
- Client ID: Safe to be public (already in frontend)
- Client Secret: Must be kept secure, never commit to Git
- Redirect URIs are restricted in Google Console
- Client ID: Safe to be public
- Client Secret: Must be kept secure, never commit to Git
- Callback URLs are restricted in GitHub settings
- Uses Prisma ORM to prevent SQL injection
- Prepared statements for all queries
- Foreign key constraints enforced
- Audit logging for all user actions
- JWT tokens with secure secrets
- Session-based authentication with NextAuth.js
- Rate limiting: 100 requests/hour per user
- Secure cookie settings in production
- Rate limiting on all endpoints
- Input validation with Zod schemas
- CORS protection
- Security headers (HSTS, CSP, etc.)
- Change all default secrets in
.env - Use complex, randomly generated secrets
- Enable HTTPS in production
- Set
NODE_ENV=production - Configure proper CORS origins
- Set up database connection pooling
- Enable Redis for production caching
- Configure monitoring and logging
- Set up error tracking (Sentry)
- Enable rate limiting
- Configure security headers
# Generate secure secrets
openssl rand -base64 32 # For JWT_SECRET
openssl rand -base64 32 # For NEXTAUTH_SECRETX-Frame-Options: DENYX-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-originPermissions-Policy: camera=(), microphone=(), geolocation=()
If you discover a security vulnerability, please report it to:
- Email: security@shelldo.com
- GitHub: Create a private security advisory
- Create public GitHub issues for security vulnerabilities
- Disclose vulnerabilities publicly before they are fixed
- Input Validation: All user inputs validated with Zod
- SQL Injection Protection: Prisma ORM with prepared statements
- XSS Protection: React's built-in XSS protection + CSP headers
- CSRF Protection: NextAuth.js built-in CSRF protection
- Rate Limiting: Redis-based rate limiting
- Audit Logging: All user actions logged
- Secure Sessions: JWT with secure httpOnly cookies
- OAuth Security: Proper OAuth 2.0 implementation
- Failed login attempts tracking
- Rate limit breach detection
- Unusual activity patterns
- Database query monitoring
- Error rate monitoring
- GDPR compliant user data handling
- Right to deletion implemented
- Data export functionality
- Privacy policy compliance
- OWASP Top 10 protections implemented
- Regular security dependency updates
- Automated vulnerability scanning in CI/CD
- Immediate: Rotate all secrets and API keys
- Assess: Determine scope of potential data exposure
- Notify: Inform affected users if personal data involved
- Document: Log incident for future prevention
- Patch: Fix vulnerability and deploy immediately
- Security Team: security@shelldo.com
- On-call: Available 24/7 for critical issues
Security is everyone's responsibility. Report issues promptly and follow secure coding practices.