You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: address 8 security vulnerabilities from codebase review
- S0 [CRITICAL]: Gate X-User-DID header behind TRUST_PROXY_HEADERS config
(default: false) to prevent admin auth bypass via header spoofing
Fixes#6
- S1: Sanitize JSONExtract/JSONExtractPath with regex validation to
prevent SQL injection in both SQLite and PostgreSQL executors
Fixes#2
- S2: Make WebSocket CheckOrigin configurable via ALLOWED_ORIGINS;
defaults to same-origin policy instead of allowing all origins
Fixes#3
- S3: Replace backfillActive bool with atomic.Bool and use CompareAndSwap
to prevent race conditions in concurrent backfill triggers
Fixes#4
- S4: Treat JTI Insert failures as replay attempts (ErrDPoPReplay)
instead of generic server errors for proper TOCTOU handling
Fixes#5
- S5: Add requireAdmin() to all admin queries (statistics, settings,
lexicons, activity, etc.) — only currentSession remains public
(also part of #6)
- S6: Add upload size limits (10MB ZIP, 500 files, 1MB/file) with
io.LimitReader to prevent memory exhaustion via ZIP bombs
Fixes#14
- S7: Disable global WriteTimeout (set to 0) to support long-lived
WebSocket subscriptions; per-handler deadlines remain in place
Fixes#16
0 commit comments