Currently, only the latest version of Cryptex is supported with security updates.
| Version | Supported |
|---|---|
| 0.8.x | ✅ |
| < 0.8 | ❌ |
If you discover a security vulnerability, please report it responsibly.
Do NOT open a public issue for security vulnerabilities.
Instead, please send an email to: security@cryptex.dev
Include the following information in your report:
- Description of the vulnerability
- Steps to reproduce the vulnerability
- Potential impact of the vulnerability
- Any suggested fixes or mitigations
- Initial response: Within 48 hours
- Detailed assessment: Within 7 days
- Fix timeline: Based on severity, typically within 30 days
- Acknowledgment: We will acknowledge receipt of your report within 48 hours
- Validation: We will validate the vulnerability and assess its severity
- Coordination: We will work with you to coordinate a fix and disclosure
- Credit: With your permission, we will credit you in the security advisory
Currently, Cryptex does not implement authentication. In production, you MUST add authentication before deploying.
Recommended approaches:
- JWT token authentication
- API key authentication
- OAuth 2.0 integration
- Use HTTPS in production (TLS/SSL)
- Implement firewall rules
- Use VPC/private networks for internal services
- Restrict access to Redis and NATS
Never commit secrets to the repository:
- Use environment variables for configuration
- Use secret management tools (HashiCorp Vault, AWS Secrets Manager)
- Rotate credentials regularly
- Use different credentials for different environments
Cryptex implements basic input validation, but in production:
- Add rate limiting
- Implement request size limits
- Validate all user inputs
- Sanitize data before storage
# Enable Redis authentication
requirepass your-strong-password
# Disable dangerous commands
rename-command FLUSHDB ""
rename-command FLUSHALL ""
rename-command CONFIG ""
# Use TLS in production
tls-port 6380
port 0
tls-cert-file /path/to/redis.crt
tls-key-file /path/to/redis.key# Enable authentication
# Use NATS account-based security
# Enable TLS for encryption# Use non-root user
USER nonroot
# Minimize attack surface
# Use minimal base images
# Regularly update base imagesCryptex includes built-in risk management:
- Position limits: Prevent excessive exposure
- Self-trade prevention: Prevent accidental conflicts
- Price collars: Prevent extreme price manipulation
Configure these appropriately for your use case:
export MAX_POSITION_SIZE=1000.0
export MIN_PRICE=0.01
export MAX_PRICE=1000000.0All orders are validated before processing:
- Trading pair validation
- Price and quantity validation
- User ID validation
- Order type validation
- Never expose sensitive information in error messages
- Use generic error messages for clients
- Log detailed errors server-side
- Implement proper error boundaries
- Encrypt sensitive data at rest
- Use Redis encryption for persistence
- Implement backup encryption
- Secure backup storage
- Use TLS for all network communications
- Encrypt WebSocket connections (wss://)
- Secure API endpoints with HTTPS
- Encrypt Redis connections
- Implement data retention policies
- Regularly clean up old orders
- Securely delete sensitive data
- Audit data access
- No Authentication: API is currently open to all requests
- No Rate Limiting: API is vulnerable to abuse
- No Audit Logging: Limited security event tracking
- No Input Sanitization: Basic validation only
- No Encryption: Data transmitted in plain text
-
Add Authentication Layer
- Implement JWT authentication
- Add API key support
- Integrate OAuth 2.0
-
Add Rate Limiting
- Implement per-user rate limits
- Add IP-based rate limiting
- Use Redis for rate limit storage
-
Add Audit Logging
- Log all order placements
- Log all cancellations
- Log all trades
- Log failed authentication attempts
-
Add Encryption
- Enable TLS for all connections
- Encrypt data at rest
- Use secure WebSocket connections
-
Add Input Sanitization
- Sanitize all user inputs
- Validate data types
- Prevent injection attacks
- Authentication implemented
- Rate limiting configured
- TLS/SSL enabled
- Secrets managed securely
- Firewall rules configured
- Redis authentication enabled
- NATS authentication enabled
- Input validation enhanced
- Error handling reviewed
- Logging configured
- Monitoring configured
- Backup strategy implemented
- Incident response plan created
- Update dependencies regularly
- Review and rotate secrets
- Monitor security advisories
- Conduct security audits
- Test backup recovery
- Review access logs
- Update firewall rules
- Review user permissions
# Check for outdated dependencies
go list -u -m all
# Update dependencies
go get -u ./...
go mod tidy
# Check for vulnerabilities
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...Regularly scan for vulnerabilities in dependencies:
# Use Go vulnerability checker
govulncheck ./...
# Use Docker security scanning
docker scan cryptex:latest
# Use third-party tools
# Snyk, Dependabot, etc.-
Detection
- Monitor security alerts
- Review logs regularly
- Monitor for unusual activity
-
Containment
- Isolate affected systems
- Disable compromised accounts
- Block malicious IPs
-
Eradication
- Remove malicious code
- Patch vulnerabilities
- Update compromised credentials
-
Recovery
- Restore from clean backups
- Monitor for recurrence
- Document lessons learned
-
Post-Incident
- Conduct post-mortem
- Update security policies
- Improve monitoring
For security incidents:
- Email: security@cryptex.dev
- PGP Key: Available on request
Ensure compliance with relevant regulations:
- GDPR (if handling EU data)
- CCPA (if handling California data)
- SOC 2 (for enterprise customers)
- PCI DSS (if handling payment data)
Aim to comply with:
- OWASP Top 10
- NIST Cybersecurity Framework
- ISO 27001 (information security)
- OWASP ZAP: Web application security scanner
- Go vulncheck: Go vulnerability scanner
- Docker Bench: Docker security best practices
- Nessus: Vulnerability scanner
- Burp Suite: Web application testing
We thank all security researchers who help keep Cryptex secure by responsibly reporting vulnerabilities.
Remember: Security is an ongoing process. Regularly review and update your security practices.