opencrm/backend
duffyduck 389b878dbd Monitoring: Threshold-Debounce auf sliding-window (statt floor-to-hour)
Bug: zweimal CRITICAL-Alert für dieselbe Brute-Force-Erkennung kam an.

Ursache: detectThresholds() hat als Cutoff für den "existing"-Check
floor(now, hour) genutzt. Bei Stundenwechsel resettete der Bucket
und der nächste Cron-Lauf fand nichts mehr "in der aktuellen Stunde"
→ erzeugte zweites SUSPICIOUS-Event → zweite Mail.

Fix: gleitendes 60min-Fenster (now - 60min). Pro IP gibt es jetzt
zuverlässig max. 1 CRITICAL-Alert pro Stunde, unabhängig von der
absoluten Uhrzeit.

Live-verifiziert in DB: zwei Alerts kamen um 07:41 und 08:00 –
genau das Pattern, das der Stunden-Reset erzeugt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 10:11:52 +02:00
..
factory-defaults docs: Factory-Defaults Import/Export-Anleitung in READMEs 2026-04-23 14:19:02 +02:00
prisma Security-Hardening Runde 10: Security-Monitoring + Alerting 2026-05-01 09:25:47 +02:00
scripts Factory-Defaults: Export + Import von Stammdaten-Katalogen 2026-04-23 14:10:12 +02:00
src Monitoring: Threshold-Debounce auf sliding-window (statt floor-to-hour) 2026-05-01 10:11:52 +02:00
uploads save email as pdf like an attachment 2026-02-04 19:18:32 +01:00
.env.example first commit 2026-01-29 01:16:54 +01:00
.gitignore Factory-Defaults: Export + Import von Stammdaten-Katalogen 2026-04-23 14:10:12 +02:00
package-lock.json Security-Hardening Runde 9: Diminishing returns 2026-05-01 08:47:20 +02:00
package.json v1.1.0: Production-readiness Release 2026-05-01 09:42:56 +02:00
tsconfig.json first commit 2026-01-29 01:16:54 +01:00