1773ed5f95
Mirror to GitHub / mirror (push) Successful in 26s
Test and Lint / backend-test (push) Successful in 1m11s
continuous-integration/drone/push Build is passing
Test and Lint / frontend-test (push) Successful in 2m28s
Version and Release / version-bump (push) Successful in 32s
Version and Release / trigger-drone (push) Has been skipped
Original: feat: enhance security logging and ensure rate limit blocks are properly tracked - Add comprehensive logging for rate limit blocks with full request details - IP address (with proper proxy detection), user agent, headers, timestamps - Rate limit info (current count, limit, remaining, reset time) - Separate tracking for auth vs general endpoints - Enhance authentication failure logging - JWT validation failures with detailed error info - Admin auth attempts without token - Failed token validation with user context - All events include IP, path, method, user agent - Improve Winston logger configuration for production - Add automatic log rotation (10MB errors, 50MB combined) - Create separate security.log for auth/rate limit events - Ensure logs directory exists automatically - Add structured JSON format for log aggregation - Support container logging with LOG_TO_CONSOLE env var - Create comprehensive documentation - Security logging guide with examples - Monitoring recommendations - Configuration reference - Add test script to verify logging functionality All rate limit settings remain configurable via admin panel: - Window duration, max requests, auth limits - Skip authenticated requests option - Public endpoints only option 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
85 lines
2.4 KiB
Markdown
85 lines
2.4 KiB
Markdown
# Security Policy
|
|
|
|
## Supported Versions
|
|
|
|
We release patches for security vulnerabilities. Currently supported versions:
|
|
|
|
| Version | Supported |
|
|
| ------- | ------------------ |
|
|
| 1.x.x | :white_check_mark: |
|
|
| < 1.0 | :x: |
|
|
|
|
## Reporting a Vulnerability
|
|
|
|
We take the security of PicPeak seriously. If you have discovered a security vulnerability, please follow these steps:
|
|
|
|
### 1. **Do NOT create a public GitHub issue**
|
|
|
|
### 2. Email us at security@example.com with:
|
|
- Description of the vulnerability
|
|
- Steps to reproduce
|
|
- Potential impact
|
|
- Suggested fix (if any)
|
|
|
|
### 3. You can expect:
|
|
- Acknowledgment within 48 hours
|
|
- Regular updates on our progress
|
|
- Credit in the fix announcement (unless you prefer to remain anonymous)
|
|
|
|
## Security Measures
|
|
|
|
PicPeak implements several security measures:
|
|
|
|
### Authentication & Authorization
|
|
- JWT-based authentication with secure token storage
|
|
- bcrypt password hashing with configurable rounds
|
|
- Role-based access control for admin functions
|
|
- Session timeout management
|
|
|
|
### Input Validation
|
|
- All user inputs are validated and sanitized
|
|
- SQL injection prevention through parameterized queries
|
|
- XSS protection via Content Security Policy
|
|
- File upload restrictions and validation
|
|
|
|
### Rate Limiting
|
|
- API rate limiting to prevent abuse
|
|
- Brute force protection on authentication endpoints
|
|
- Configurable limits per endpoint
|
|
|
|
### Data Protection
|
|
- HTTPS enforcement in production
|
|
- Secure cookie settings
|
|
- CORS configuration
|
|
- Sensitive data encryption
|
|
|
|
### Infrastructure
|
|
- Regular dependency updates
|
|
- Security headers (HSTS, X-Frame-Options, etc.)
|
|
- Activity logging for audit trails
|
|
- Automated backups
|
|
|
|
## Best Practices for Deployment
|
|
|
|
1. **Always use HTTPS** in production
|
|
2. **Change default passwords** immediately
|
|
3. **Keep dependencies updated** regularly
|
|
4. **Configure firewall rules** appropriately
|
|
5. **Monitor logs** for suspicious activity
|
|
6. **Backup regularly** and test restoration
|
|
|
|
## Vulnerability Disclosure
|
|
|
|
We believe in responsible disclosure. Once a vulnerability is fixed:
|
|
|
|
1. We'll publish a security advisory
|
|
2. Credit researchers (with permission)
|
|
3. Detail the impact and mitigation steps
|
|
4. Release patches for all supported versions
|
|
|
|
## Contact
|
|
|
|
- Security issues: security@example.com
|
|
- General support: https://github.com/the-luap/picpeak/issues
|
|
|
|
Thank you for helping keep PicPeak and its users safe! |