1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! # zentinel-modsec
//!
//! Pure Rust implementation of ModSecurity with full OWASP CRS compatibility.
//!
//! This crate provides a complete ModSecurity rule engine without any C/C++ dependencies,
//! making it easier to deploy, audit, and maintain.
//!
//! ## Features
//!
//! - Full SecRule language support
//! - OWASP CRS compatibility (800+ rules)
//! - Pure Rust libinjection for @detectSQLi/@detectXSS
//! - Thread-safe, async-ready transaction processing
//! - Zero external C/C++ dependencies
//!
//! ## Quick Start
//!
//! ```ignore
//! use zentinel_modsec::{ModSecurity, Rules, Transaction};
//!
//! // Create engine and load rules
//! let modsec = ModSecurity::new();
//! let mut rules = Rules::new();
//! rules.add_plain("SecRuleEngine On")?;
//! rules.add_file("/etc/modsecurity/crs/rules/*.conf")?;
//!
//! // Process a request
//! let mut tx = modsec.transaction(&rules);
//! tx.process_uri("/api/users?id=1", "GET", "HTTP/1.1")?;
//! tx.add_request_header("Host", "example.com")?;
//! tx.process_request_headers()?;
//!
//! // Check for intervention
//! if let Some(intervention) = tx.intervention() {
//! println!("Blocked: status={}", intervention.status());
//! }
//! ```
// Re-export main types at crate root
pub use ;
pub use ;
pub use ;
/// Protocol version for compatibility tracking
pub const PROTOCOL_VERSION: u32 = 1;
/// Crate version
pub const VERSION: &str = env!;