This project intentionally uses bleeding-edge experimental versions of dependencies (marked with next or latest tags). While this provides access to cutting-edge features, it also introduces potential security risks.
| Version | Support Status | Node.js Requirement |
|---|---|---|
| 2.0.x | ✅ Active | ≥22.0.0 |
| 1.0.x | ❌ Unsupported | ≥18.0.0 |
- Helmet.js: Comprehensive security headers (CSP, HSTS, X-Frame-Options, etc.)
- Distributed Rate Limiting: Redis-backed rate limiting for different endpoint types
- API endpoints: 100 requests/15min
- Authentication: 5 attempts/15min
- GraphQL: 50 requests/15min
- WebSocket: 10 connections/min
- Input Validation: express-validator with sanitization
- CSRF Protection: Token-based CSRF validation
- HPP Protection: HTTP Parameter Pollution prevention
- Request Size Limits: 10MB default limit
- Security Audit Logging: Comprehensive request/response logging
- CORS Configuration: Whitelist-based origin control
- Argon2 Password Hashing: Memory-hard hashing with configurable parameters
- JWT with Refresh Tokens: Short-lived access tokens (15min) with long-lived refresh (7d)
- Two-Factor Authentication: TOTP-based 2FA with OTPLib and Speakeasy
- Session Security: Secure, HTTP-only cookies with SameSite protection
- Dependency Locking: Prevents implicit upgrades
- Script Execution Control: Configurable install script handling
- Automatic Auditing: Security checks on every install
- Strict SSL: Enforces secure connections
- Multi-stage Builds: Minimal production image
- Non-root User: Runs as
nodejsuser (UID 1001) - Alpine Base: Minimal attack surface
- Security Updates: Automatic OS-level updates
- Health Checks: Built-in container health monitoring
Philosophy: This project uses pre-release versions to stay on the cutting edge. This is intentional but requires:
-
Regular Monitoring:
npm run security-check npm audit npm outdated
-
Automated Scanning (GitHub Actions):
- npm audit on every push
- Snyk security scanning
- CodeQL analysis (security-and-quality queries)
- Dependency review for PRs
- Docker image scanning with Trivy
- Secret scanning with TruffleHog
- Weekly scheduled scans
-
Update Strategy:
# Update all experimental dependencies npm run update:experimental # Force update to bleeding-edge npm run update:bleeding-edge
- Health Checks: Comprehensive endpoints at
/health/*- Basic:
/health - Detailed:
/health/detailed - Kubernetes probes:
/health/ready,/health/live,/health/startup - Security status:
/health/security - Version info:
/health/version
- Basic:
- OpenTelemetry: Distributed tracing
- Prometheus Metrics: Time-series monitoring
- Sentry Error Tracking: Real-time error monitoring
- Pino Logging: High-performance structured logging
- CVE-2025-27210: Windows device names bypass (patched in 22.13.1+)
- CVE-2025-23167: HTTP header termination flaw (patched in 22.x)
- CVE-2025-23084: Path traversal vulnerabilities (patched)
Action Required: Always use Node.js 22.13.1 or later
node --version # Should be ≥22.13.1- Query Depth Limiting: Prevents deeply nested queries
- Query Complexity Analysis: Limits computational cost
- Query Timeouts: Maximum execution time enforcement
- Rate Limiting: Separate limits for GraphQL endpoints
- Input Validation: Schema-based validation with Zod
- Introspection Control: Disable in production (ENV:
GRAPHQL_INTROSPECTION=false)
- Disable introspection in production
- Implement query whitelisting for critical operations
- Use persisted queries for production
- Monitor query performance and complexity
- DO NOT open a public issue
- Use GitHub Security Advisories (preferred):
- Go to Security tab → Report a vulnerability
- Or email: [email protected]
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Affected versions
- Suggested fix (if any)
- CVE ID (if already assigned)
- Initial Response: Within 48 hours
- Triage: Within 72 hours
- Status Update: Within 7 days
- Fix Target:
- Critical: 24-48 hours
- High: 7 days
- Medium: 30 days
- Low: Next scheduled release
- Critical 🔴: Remote code execution, data breach, authentication bypass
- High 🟠: Privilege escalation, SQL injection, XSS
- Medium 🟡: Information disclosure, DoS vulnerabilities
- Low 🟢: Configuration issues, minor security improvements
Using next and latest tags means:
✅ Advantages:
- Access to newest features
- Early bug fixes
- Cutting-edge performance improvements
- Latest security patches
- Potential instability
- Breaking API changes without warning
- Undiscovered vulnerabilities
- Limited production testing
- Incomplete documentation
- Lock File: We commit
package-lock.jsonfor reproducible builds - Regular Audits: Automated security checks on every commit
- Multiple Scanners: Using several security tools for comprehensive coverage
- Rapid Response: Fast patching when vulnerabilities are discovered
- Monitoring: Real-time error tracking with Sentry
- Testing: Comprehensive test coverage before deployment
# Always check security status
npm run security-check
# Review audit report
npm audit
# Check outdated packages
npm outdated
# Run security-focused linting
npm run lint:check
# Run in development mode with detailed logs
npm run devIf you must use it:
-
Environment Configuration:
NODE_ENV=production ENABLE_HELMET=true ENABLE_RATE_LIMITING=true ENABLE_CSRF_PROTECTION=true ENABLE_2FA=true SESSION_SECURE=true GRAPHQL_INTROSPECTION=false GRAPHQL_PLAYGROUND=false
-
Infrastructure:
- Run behind reverse proxy (nginx/Caddy)
- Use HTTPS/TLS with valid certificates
- Implement WAF rules (Cloudflare, AWS WAF)
- Set up DDoS protection
- Use containerization (Docker/Kubernetes)
-
Monitoring:
- Enable all observability features
- Set up alerting (PagerDuty, Opsgenie)
- Regular security audits
- Penetration testing
-
Database Security:
- Use connection encryption
- Implement IP whitelisting
- Enable authentication
- Regular backups
-
Secrets Management:
- Use environment variables
- Never commit secrets
- Rotate credentials regularly
- Use secret management service (Vault, AWS Secrets Manager)
- Helmet.js security headers
- Distributed rate limiting
- Input validation and sanitization
- CSRF protection
- HPP protection
- Request size limits
- Memory leak prevention
- Graceful error handling
- Security audit logging
- Argon2 password hashing
- JWT with refresh tokens
- Two-factor authentication support
- Secure session management
- CORS configuration
- Environment variable configuration
- Docker security hardening
- Health check endpoints
- Kubernetes-ready probes
- Automated security scanning (GitHub Actions)
- npm audit on CI
- CodeQL analysis
- Dependency review
- Docker image scanning
- Secret scanning
- Dependabot alerts
- Weekly security scans
- npm configuration hardening
- Dependency locking
- Regular updates
- Multiple security scanners
| Date | Version | Changes |
|---|---|---|
| 2025-12-15 | 2.0.0 | Enhanced security middleware, Docker hardening, CI/CD |
| 2024-12-05 | 1.0.0 | Initial security implementation |
Remember: This is an experimental project. Security is a shared responsibility. Stay vigilant, keep dependencies updated, and report issues promptly.
🔒 Security is not a feature, it's a process.