sigma-rust
A library for parsing and evaluating Sigma rules written in Rust.
Features
- Supports all sigma modifiers except
expand
modifiers - Supports the whole Sigma condition syntax using Pratt parsing
- Written in 100% safe Rust
- Extensive test suite
Example
use ;
Check out the examples
folder for more examples.
Strong type checking
This library performs strong type checking. That is, if you have a rule like
selection:
- myname: 42
it would not match the event {"myname": "42"}
, however, it would match {"myname": 42}
(note the difference
between string and integer).
If you need to match against several types you can define a rule such as the following.
selection_1:
field: 42
selection_2:
field: "42"
condition: 1 of them
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.