|
2 | 2 |
|
3 | 3 | ## Supported Versions |
4 | 4 |
|
5 | | -Use this section to tell people about which versions of your project are |
6 | | -currently being supported with security updates. |
| 5 | +The following versions of SafeEscape backend are currently supported with security updates: |
7 | 6 |
|
8 | 7 | | Version | Supported | |
9 | 8 | | ------- | ------------------ | |
10 | | -| 5.1.x | :white_check_mark: | |
11 | | -| 5.0.x | :x: | |
12 | | -| 4.0.x | :white_check_mark: | |
13 | | -| < 4.0 | :x: | |
| 9 | +| 1.0.x | :white_check_mark: | |
| 10 | +| < 1.0 | :x: | |
| 11 | + |
| 12 | +## Security Features |
| 13 | + |
| 14 | +### Current Security Measures |
| 15 | + |
| 16 | +- **Environment Variable Validation**: All required environment variables are validated on startup |
| 17 | +- **Secure CORS Configuration**: Environment-specific CORS settings with restrictive production defaults |
| 18 | +- **Rate Limiting**: Comprehensive rate limiting for different endpoint types |
| 19 | +- **Input Validation**: All user inputs are sanitized and validated |
| 20 | +- **Secure File Uploads**: File type validation, size limits, and content verification |
| 21 | +- **Error Handling**: Secure error responses that prevent information disclosure |
| 22 | +- **Authentication**: JWT-based authentication with proper token validation |
| 23 | +- **Security Headers**: Helmet.js for security headers (CSP, XSS protection, etc.) |
| 24 | +- **Dependency Security**: Regular npm audit checks and automatic fixes |
| 25 | + |
| 26 | +### Security Headers |
| 27 | + |
| 28 | +The application automatically sets the following security headers: |
| 29 | + |
| 30 | +- `X-Content-Type-Options: nosniff` |
| 31 | +- `X-Frame-Options: DENY` |
| 32 | +- `X-XSS-Protection: 1; mode=block` |
| 33 | +- `Strict-Transport-Security` (in production) |
| 34 | + |
| 35 | +### Rate Limiting |
| 36 | + |
| 37 | +Different endpoints have different rate limits: |
| 38 | + |
| 39 | +- **General API**: 100 requests per 15 minutes |
| 40 | +- **Authentication**: 5 requests per 15 minutes |
| 41 | +- **Voice API**: 10 requests per 5 minutes |
| 42 | +- **File Uploads**: 5 requests per 10 minutes |
| 43 | +- **Emergency APIs**: 20 requests per minute |
14 | 44 |
|
15 | 45 | ## Reporting a Vulnerability |
16 | 46 |
|
17 | | -Use this section to tell people how to report a vulnerability. |
| 47 | +### How to Report |
| 48 | + |
| 49 | +If you discover a security vulnerability in SafeEscape, please report it responsibly: |
| 50 | + |
| 51 | +1. **DO NOT** create a public GitHub issue for security vulnerabilities |
| 52 | +2. **DO NOT** post security issues in forums or chat rooms |
| 53 | +3. **DO ** email security reports to: [[email protected]](mailto:[email protected]) |
| 54 | + |
| 55 | +### What to Include |
| 56 | + |
| 57 | +Please include the following information in your security report: |
| 58 | + |
| 59 | +- **Description**: Clear description of the vulnerability |
| 60 | +- **Steps to Reproduce**: Detailed steps to reproduce the issue |
| 61 | +- **Impact**: Potential impact and severity assessment |
| 62 | +- **Affected Versions**: Which versions are affected |
| 63 | +- **Proof of Concept**: If possible, include a proof of concept (but do not exploit the vulnerability) |
| 64 | +- **Suggested Fix**: If you have suggestions for fixing the issue |
| 65 | + |
| 66 | +### Response Timeline |
| 67 | + |
| 68 | +- **Acknowledgment**: We will acknowledge receipt of your report within 48 hours |
| 69 | +- **Initial Assessment**: We will provide an initial assessment within 5 business days |
| 70 | +- **Status Updates**: We will provide regular updates every 10 business days |
| 71 | +- **Resolution**: We aim to resolve critical vulnerabilities within 30 days |
| 72 | + |
| 73 | +### Responsible Disclosure |
| 74 | + |
| 75 | +We follow responsible disclosure practices: |
| 76 | + |
| 77 | +1. **Investigation**: We will investigate and validate the reported vulnerability |
| 78 | +2. **Fix Development**: We will develop and test a fix |
| 79 | +3. **Coordinated Disclosure**: We will coordinate with you on the disclosure timeline |
| 80 | +4. **Public Disclosure**: After the fix is deployed, we will publicly disclose the vulnerability |
| 81 | + |
| 82 | +## Security Best Practices |
| 83 | + |
| 84 | +### For Developers |
| 85 | + |
| 86 | +- Always validate and sanitize user inputs |
| 87 | +- Use parameterized queries to prevent SQL injection |
| 88 | +- Implement proper authentication and authorization |
| 89 | +- Keep dependencies up to date |
| 90 | +- Follow secure coding practices |
| 91 | +- Use environment variables for sensitive configuration |
| 92 | + |
| 93 | +### For Deployment |
| 94 | + |
| 95 | +- Use strong, unique passwords and API keys |
| 96 | +- Enable HTTPS in production |
| 97 | +- Set up proper firewall rules |
| 98 | +- Monitor logs for suspicious activity |
| 99 | +- Regularly update server software |
| 100 | +- Use secure environment variable management |
| 101 | + |
| 102 | +### For Users |
| 103 | + |
| 104 | +- Use strong, unique passwords |
| 105 | +- Enable two-factor authentication when available |
| 106 | +- Keep your applications updated |
| 107 | +- Report suspicious activity immediately |
| 108 | + |
| 109 | +## Security Checklist |
| 110 | + |
| 111 | +Before deploying to production, ensure: |
| 112 | + |
| 113 | +- [ ] All environment variables are properly configured |
| 114 | +- [ ] CORS is configured for your specific domains |
| 115 | +- [ ] Rate limiting is enabled and configured appropriately |
| 116 | +- [ ] HTTPS is enabled with valid certificates |
| 117 | +- [ ] Security headers are configured |
| 118 | +- [ ] Error messages don't leak sensitive information |
| 119 | +- [ ] File uploads are properly validated |
| 120 | +- [ ] Authentication is working correctly |
| 121 | +- [ ] All dependencies are up to date |
| 122 | +- [ ] Security monitoring is in place |
| 123 | + |
| 124 | +## Contact |
| 125 | + |
| 126 | +For security-related questions or concerns: |
| 127 | + |
| 128 | + |
| 129 | +- **General Support **: [[email protected]](mailto:[email protected]) |
| 130 | + |
| 131 | +--- |
18 | 132 |
|
19 | | -Tell them where to go, how often they can expect to get an update on a |
20 | | -reported vulnerability, what to expect if the vulnerability is accepted or |
21 | | -declined, etc. |
| 133 | +**Note**: This security policy is subject to change. Please check back regularly for updates. |
0 commit comments