DeepLX is a serverless translation API built on Cloudflare Workers that prioritizes security through multiple layers of protection. This document outlines our security practices, vulnerability reporting procedures, and security considerations for users.
We provide security updates for the following versions:
| Version | Supported |
|---|---|
| 1.0.x | β |
| < 1.0 | β |
- Text Length Limits: Maximum 5,000 characters per translation request
- Language Code Validation: Strict validation of language codes (2-5 characters, alphanumeric and hyphens only)
- Request Size Limits: Maximum 32KB request payload
- Parameter Type Checking: Strict type validation for all input parameters
- Multi-layer Rate Limiting:
- Per-proxy endpoint: 8 requests/second
- Global rate limiting with token bucket algorithm
- Client IP-based rate limiting
- Circuit Breaker: Automatic failover when endpoints become unavailable
- Cloudflare Protection: Built-in DDoS protection and bot mitigation
All responses include comprehensive security headers:
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: geolocation=(), microphone=(), camera=()
Content-Security-Policy: default-src 'self'; script-src 'none'; object-src 'none';- Configurable CORS policies
- Preflight request handling
- Secure cross-origin resource sharing
- Trusted IP extraction from Cloudflare headers (
CF-Connecting-IP) - Fallback to
X-Forwarded-Forwith validation - IPv4 and IPv6 address validation
- Protection against IP spoofing
- No Persistent Storage: Translation requests are not permanently stored
- Temporary Caching: Results cached for performance (configurable TTL)
- Memory Management: Automatic cache cleanup every 5 minutes
- No Logging of Sensitive Data: Translation content is not logged
- Client IP Handling: IPs used only for rate limiting, not stored permanently
- Request Sanitization: All input parameters are sanitized before processing
- Error Response Sanitization: Sensitive information never exposed in error messages
The debug endpoint (/debug) includes additional security measures:
- Production Disabled: Automatically disabled unless
DEBUG_MODE=true - Limited Information: Only shows sanitized request structure
- No Sensitive Data: Never exposes API keys, tokens, or raw translation content
- Use HTTPS-only endpoints
- Regularly rotate proxy endpoints
- Monitor proxy endpoint health
- Implement endpoint-specific rate limiting
- Restrict API access using Cloudflare Access (if needed)
- Implement custom authentication for sensitive use cases
- Monitor usage patterns for anomalies
- Monitor rate limit violations
- Track unusual request patterns
- Set up alerts for service degradation
- Regular security audits of proxy endpoints
// Example: Custom logging for security events
if (rateLimitExceeded) {
console.log(`Rate limit exceeded for IP: ${hashedIP}`);
}We take security vulnerabilities seriously. If you discover a security issue, please follow these steps:
2. Send details to: [email protected]
Subject: [SECURITY] DeepLX Vulnerability Report
- Description of the vulnerability
- Steps to reproduce the issue
- Potential impact assessment
- Suggested fix (if available)
- Your contact information
- Initial Response: Within 48 hours
- Vulnerability Assessment: Within 7 days
- Fix Development: Within 14 days (depending on severity)
- Public Disclosure: After fix deployment (coordinated disclosure)
We appreciate security researchers who help improve DeepLX security:
- Public acknowledgment (with permission)
- Credit in release notes
- Priority support for future issues
- Proxy Endpoints: Security depends on proxy endpoint implementations
- Cloudflare Workers: Subject to Cloudflare's security model
- External Translation Services: Data passes through third-party services
- Distributed Attacks: Multiple IPs can potentially bypass rate limits
- Proxy Rotation: Attackers might use multiple proxy endpoints
- Cache Key Collision: Theoretical risk of cache key collisions
- Memory Cache: In-memory cache vulnerable to memory-based attacks
// Example: Additional rate limiting layers
const ENHANCED_RATE_LIMITS = {
PER_IP_PER_MINUTE: 60,
PER_IP_PER_HOUR: 1000,
GLOBAL_PER_SECOND: 100
};// Example: Enhanced input validation
function validateTranslationRequest(params: any): boolean {
return (
params.text &&
typeof params.text === 'string' &&
params.text.length <= MAX_TEXT_LENGTH &&
!containsSuspiciousPatterns(params.text)
);
}- OWASP Top 10: Protection against common web vulnerabilities
- CSP: Content Security Policy implementation
- HTTPS Only: All communications encrypted in transit
- Input Validation: Following OWASP input validation guidelines
- GDPR Considerations: No personal data storage by default
- Data Minimization: Only necessary data processed
- Right to Erasure: Cache expiration ensures data removal
- Security updates announced via GitHub releases
- Critical vulnerabilities communicated via email (if contact provided)
- Security advisories published for high-severity issues
- Assessment: Evaluate security impact
- Development: Create and test security fix
- Testing: Comprehensive security testing
- Deployment: Coordinated release deployment
- Communication: Public disclosure after fix deployment
- Security Headers Checker
- SSL Labs SSL Test
- OWASP ZAP for security testing
For critical security issues requiring immediate attention:
- Email: [email protected]
- Subject:
[URGENT SECURITY] DeepLX Critical Vulnerability
While we implement comprehensive security measures, users should:
- Avoid Sensitive Data: Don't translate confidential or sensitive information
- Monitor Usage: Regularly review API usage patterns
- Keep Updated: Use the latest version of DeepLX
- Follow Best Practices: Implement additional security measures as needed
Remember: Security is a shared responsibility. While we provide a secure foundation, proper deployment and usage practices are essential for maintaining security.
{ "vars": { "DEBUG_MODE": "false", // Always false in production "PROXY_URLS": "https://your-secure-endpoints.com/jsonrpc" } }