2 Commits

Author SHA1 Message Date
Username
89eee3378a security: implement pentest remediation (PROXY-001, BURN-001, RATE-001)
All checks were successful
CI / Lint & Format (push) Successful in 18s
CI / Security Scan (push) Successful in 22s
CI / Memory Leak Check (push) Successful in 21s
CI / Tests (push) Successful in 1m16s
PROXY-001: Add startup warning when TRUSTED_PROXY_SECRET empty in production
- validate_security_config() checks for missing proxy secret
- Additional warning when PKI enabled without proxy secret
- Tests for security configuration validation

BURN-001: HEAD requests now trigger burn-after-read deletion
- Prevents attacker from probing paste existence before retrieval
- Updated test to verify new behavior

RATE-001: Add RATE_LIMIT_MAX_ENTRIES to cap memory usage
- Default 10000 unique IPs tracked
- Prunes oldest entries when limit exceeded
- Protects against memory exhaustion DoS

Test count: 284 -> 291 (7 new security tests)
2025-12-24 21:42:15 +01:00
Username
cf458347ef add systemd service unit and rate limit headers
All checks were successful
CI / Lint & Format (push) Successful in 18s
CI / Security Scan (push) Successful in 23s
CI / Memory Leak Check (push) Successful in 21s
CI / Tests (push) Successful in 1m16s
Systemd deployment:
- examples/flaskpaste.service with security hardening
- examples/flaskpaste.env with all config options
- README deployment section updated

Rate limit headers (X-RateLimit-*):
- Limit, Remaining, Reset on 201 and 429 responses
- Per-IP tracking with auth multiplier
- api.md documented
2025-12-24 17:51:14 +01:00