guard-core-engine 4.4.0

Detection engine for the Guard ecosystem: pattern compilation, input preprocessing, and semantic analysis.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! The killable pattern-probe child binary.
//!
//! The pattern-safety chain spawns this binary with a hidden subcommand
//! and speaks JSON on stdin/stdout so runaway backtracking loops can be
//! killed on deadline (the reference uses `python -c` children for the
//! same reason).

fn main() {
    let args: Vec<String> = std::env::args().collect();
    let code = guard_core_engine::redos::child::child_main(&args).unwrap_or_else(|| {
        eprintln!("usage: guard-pattern-probe __guard_pattern_probe < payload.json");
        2
    });
    std::process::exit(code);
}