Trait armorlib::scan_module::ScanModule
[−]
[src]
pub trait ScanModule {
fn scan(
&self,
scan_object: &ScanObject
) -> Result<Vec<Finding>, ArmorlibError>;
fn required_preprocessors(&self) -> Vec<&'static str>;
fn info(&self) -> (&'static str, &'static str);
fn name(&self) -> &'static str { ... }
fn description(&self) -> &'static str { ... }
}A trait that defines the necessary functions for ScanModules to implement. To contribute a
new scan module, it will also need to be included in mod.rs inside the scan_modules
directory. A scan module is a modular component that finds vulnerabilities to privacy and
security inside ScanObjects. The ScanModule is the core component of ArmorLib.
Required Methods
fn scan(&self, scan_object: &ScanObject) -> Result<Vec<Finding>, ArmorlibError>
Scan the given scan_object and return either a vector of Findings or, in case of an
error, an ArmorlibError.
fn required_preprocessors(&self) -> Vec<&'static str>
Return a Vec of &'static strs indicating the preprocessors that the scan module relies
on for running. These names should match the name provided by the processor in its name()
function.
fn info(&self) -> (&'static str, &'static str)
Returns a tuple containing the name and description of the scan module.
Provided Methods
fn name(&self) -> &'static str
Returns a &'static str of the name of the scan module. This information is drawn from
the information provided by info() in its default implementation.
fn description(&self) -> &'static str
Returns a &'static str of the description of the scan module. This information is drawn
from the information provided by info() in its default implementation.
Implementors
impl ScanModule for StringsScanModuleimpl ScanModule for UnicodeWatermarkScanModule