 Juan DenisandClaude Opus 4.8
|
ada030553a
|
feat(security): per-app WAF (ModSecurity v3 + OWASP CRS)
- WafPolicy model (per app: mode off/detect/block, paranoia level, anomaly
threshold, disabled CRS rule ids).
- WafService: render_rules (SecRuleEngine + CRS include + paranoia/anomaly +
SecRuleRemoveById), nginx_snippet, install/status (distro-aware,
best-effort), apply() that writes per-app rules under
/etc/nginx/serverkit-conf.d/waf and idempotently injects an include into
the app vhost (graceful manual_include fallback), and audit-log event
parsing.
- API /api/v1/waf: per-app policy GET/PUT, apply, events, install status.
- 29 tests: rule rendering per mode, rule-disable, nginx snippet, policy
validation, audit-log parsing, API round-trip + auth.
Backend only; WAF UI + verified install on a real nginx+ModSecurity host are
follow-ups. Integration is additive — existing nginx/site management untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-19 14:02:24 -04:00 |
|