Struct usiem::components::alert::SiemRule
source · pub struct SiemRule {
pub name: &'static str,
pub service: &'static str,
pub description: &'static str,
pub templates: &'static BTreeMap<&'static str, &'static str>,
pub tenants: &'static BTreeMap<&'static str, &'static str>,
pub mitre: (&'static Vec<MitreTactics>, &'static Vec<MitreTechniques>),
pub datasets: BTreeMap<SiemDatasetType, SiemDataset>,
pub needed_datasets: &'static Vec<SiemDatasetType>,
pub rule: SiemRuleMatchSync,
}
Fields
name: &'static str
Name of the rule
service: &'static str
Name of the Service applied to match this rule
description: &'static str
A description of the rule to be showed in the UI
templates: &'static BTreeMap<&'static str, &'static str>
Includes templateS for this rule. used to generate the alert description
tenants: &'static BTreeMap<&'static str, &'static str>
Sets the mapping of languages to be used in each tenant
mitre: (&'static Vec<MitreTactics>, &'static Vec<MitreTechniques>)
tactics and techniques covered by this rule
datasets: BTreeMap<SiemDatasetType, SiemDataset>
Datasets to be used by the rules
needed_datasets: &'static Vec<SiemDatasetType>
List of datasets needed by this rule
rule: SiemRuleMatchSync
Checks if the log matches this rule. It can return an alert and/or an action to be executed by the SOAR
Implementations
sourceimpl SiemRule
impl SiemRule
pub fn match_log(
&self,
log: &SiemLog
) -> Option<(Option<SiemAlert>, Option<SiemTask>)>
sourcepub fn set_dataset(&mut self, dataset: SiemDataset)
pub fn set_dataset(&mut self, dataset: SiemDataset)
Updates the references for the datasets
sourcepub fn get_dataset(&self, typ: SiemDatasetType) -> Option<&SiemDataset>
pub fn get_dataset(&self, typ: SiemDatasetType) -> Option<&SiemDataset>
To be used by the SiemRuleMatch
sourcepub fn get_template_for_log(&self, log: &SiemLog) -> &'static str
pub fn get_template_for_log(&self, log: &SiemLog) -> &'static str
To be used by the SiemRuleMatch
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SiemRule
impl Send for SiemRule
impl Sync for SiemRule
impl Unpin for SiemRule
impl UnwindSafe for SiemRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more