pub trait Detector: Send + Sync {
// Required methods
fn metadata(&self) -> RuleMetadata;
fn run(&self, target: &ScanTarget) -> Vec<Finding>;
}Expand description
A detector checks a ScanTarget and produces findings.
Required Methods§
Sourcefn metadata(&self) -> RuleMetadata
fn metadata(&self) -> RuleMetadata
Metadata about this rule (id, name, severity, CWE).
Sourcefn run(&self, target: &ScanTarget) -> Vec<Finding>
fn run(&self, target: &ScanTarget) -> Vec<Finding>
Run the detector against a scan target.