pub struct SigmaRule {Show 21 fields
pub title: String,
pub logsource: LogSource,
pub detection: Detections,
pub sigma_version: Option<u32>,
pub id: Option<String>,
pub name: Option<String>,
pub related: Vec<Related>,
pub taxonomy: Option<String>,
pub status: Option<Status>,
pub description: Option<String>,
pub license: Option<String>,
pub author: Option<String>,
pub references: Vec<String>,
pub date: Option<String>,
pub modified: Option<String>,
pub fields: Vec<String>,
pub falsepositives: Vec<String>,
pub level: Option<Level>,
pub tags: Vec<String>,
pub scope: Vec<String>,
pub custom_attributes: HashMap<String, Value>,
}Expand description
A complete Sigma detection rule.
Reference: Sigma schema V2.0.0, pySigma rule.py SigmaRule
Fields§
§title: String§logsource: LogSource§detection: Detections§sigma_version: Option<u32>The Sigma specification MAJOR version this rule targets (the
sigma-version attribute, e.g. 3). None means absent, which resolves
to the fixed floor crate::version::SPEC_VERSION_FLOOR. Only the major
is stored, since breaking spec changes occur only at major bumps; it
gates version-sensitive interpretation such as array-matching brackets.
id: Option<String>§name: Option<String>§taxonomy: Option<String>§status: Option<Status>§description: Option<String>§license: Option<String>§references: Vec<String>§date: Option<String>§modified: Option<String>§fields: Vec<String>§falsepositives: Vec<String>§level: Option<Level>§scope: Vec<String>§custom_attributes: HashMap<String, Value>Custom attributes attached to the rule.
Populated from (a) any top-level YAML key that is not part of the
standard Sigma rule schema, (b) the entries of the dedicated top-level
custom_attributes: mapping (explicit entries win over arbitrary keys
of the same name), and (c) pipeline transformations such as
SetCustomAttribute, which are applied last and override both.
Mirrors pySigma’s SigmaRule.custom_attributes dict. Engines and
backends can read these to modify per-rule behavior.