veza/veza-chat-server
senke 3cc8c36a2c fix(chat): replace Regex::new().unwrap() with static Lazy in security_legacy.rs
Replace 65+ Regex::new().unwrap() calls with three once_cell::sync::Lazy
static collections:

- DANGEROUS_PATTERNS: 60+ XSS/SQL/command injection regexes
- ROOM_NAME_REGEX: room name character validation
- TOXIC_PATTERNS: 5 toxicity detection regexes

All patterns are compiled once at startup with .ok() filter for safety.
ContentFilter, ToxicityDetector now clone from the statics.

Also adds pub mod security_legacy to lib.rs so the module is compiled
and checked during CI builds.

Addresses audit finding D9: .unwrap() on Regex::new() in legacy code.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 23:27:54 +01:00
..
config adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
docs report generation and future tasks selection 2025-12-08 19:57:54 +01:00
migrations report generation and future tasks selection 2025-12-08 19:57:54 +01:00
proto adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
scripts report generation and future tasks selection 2025-12-08 19:57:54 +01:00
src fix(chat): replace Regex::new().unwrap() with static Lazy in security_legacy.rs 2026-02-11 23:27:54 +01:00
.clippy.toml adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
.dockerignore adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
.env.lab.example chore(rust): chat server env, veza-common auth, stream server routes/websocket 2026-02-11 22:19:17 +01:00
.gitignore report generation and future tasks selection 2025-12-08 19:57:54 +01:00
AUDIT_CHAT_SERVER_RUST.md adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
AUDIT_EXHAUSTIF_CHAT_SERVER.md refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
build.rs [T0-002] fix(rust): Corriger erreurs compilation Rust 2026-01-04 01:44:20 +01:00
Cargo.toml fix(deps): upgrade outdated Rust dependencies across services 2026-02-11 23:18:34 +01:00
check_output.txt stabilizing veza-backend-api: phase 1 2025-12-16 11:23:49 -05:00
check_output_2.txt STABILISATION: phase 1 & phase 2 2025-12-06 14:45:07 +01:00
deploy-simple.sh adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
docker-compose.local.yml adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
docker-compose.yml adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
Dockerfile adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
Dockerfile.production adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
env.example adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
Makefile adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00
sqlx-data.json adding initial chat server (Rust) 2025-12-03 20:33:26 +01:00