Skip to main content

Scanner

Trait Scanner 

Source
pub trait Scanner:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
        client: &'life2 HttpClient,
        config: &'life3 Config,
    ) -> Pin<Box<dyn Future<Output = (Vec<Finding>, Vec<CapturedError>)> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Every scanner module implements this trait.

scan() returns (findings, errors) and must never panic; all internal errors should be captured and returned in the error vector.

Required Methods§

Source

fn name(&self) -> &'static str

Stable scanner identifier used for logging, metrics, and reporting.

Source

fn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, url: &'life1 str, client: &'life2 HttpClient, config: &'life3 Config, ) -> Pin<Box<dyn Future<Output = (Vec<Finding>, Vec<CapturedError>)> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Run this scanner against a single URL.

Implementors§