pub struct RuleEngine { /* private fields */ }Expand description
The rule engine runs all registered detectors against a target.
Implementations§
Source§impl RuleEngine
impl RuleEngine
Sourcepub fn with_custom_rules(self, custom: Vec<CustomRuleDetector>) -> Self
pub fn with_custom_rules(self, custom: Vec<CustomRuleDetector>) -> Self
Add custom rule detectors to the engine.
Sourcepub fn load_custom_rules_from(&mut self, dir: &Path) -> Result<()>
pub fn load_custom_rules_from(&mut self, dir: &Path) -> Result<()>
Load custom rules from a directory into this engine.
Sourcepub fn run(&self, target: &ScanTarget) -> Vec<Finding>
pub fn run(&self, target: &ScanTarget) -> Vec<Finding>
Run all detectors against a scan target.
Sourcepub fn list_rules(&self) -> Vec<RuleMetadata>
pub fn list_rules(&self) -> Vec<RuleMetadata>
List metadata for all registered rules, including custom rules.
Sourcepub fn list_scanner_rules(&self) -> Vec<RuleMetadata>
pub fn list_scanner_rules(&self) -> Vec<RuleMetadata>
List metadata for all scanner rules, including future contextual detectors.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RuleEngine
impl !UnwindSafe for RuleEngine
impl Freeze for RuleEngine
impl Send for RuleEngine
impl Sync for RuleEngine
impl Unpin for RuleEngine
impl UnsafeUnpin for RuleEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more