pub struct Scanner { /* private fields */ }Expand description
The main scanner that audits a Gemfile.lock for security issues.
Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new(lockfile_path: &Path, database: Database) -> Result<Self, ScanError>
pub fn new(lockfile_path: &Path, database: Database) -> Result<Self, ScanError>
Create a new scanner from a lockfile path and database.
Sourcepub fn from_lockfile(lockfile: Lockfile, database: Database) -> Self
pub fn from_lockfile(lockfile: Lockfile, database: Database) -> Self
Create a scanner from an already-parsed lockfile and database.
Sourcepub fn scan(&self, options: &ScanOptions) -> Report
pub fn scan(&self, options: &ScanOptions) -> Report
Run a full scan and produce a report.
Sourcepub fn scan_sources(&self) -> Vec<InsecureSource>
pub fn scan_sources(&self) -> Vec<InsecureSource>
Scan gem sources for insecure protocols (git://, http://).
Sourcepub fn scan_specs(
&self,
options: &ScanOptions,
) -> (Vec<UnpatchedGem>, usize, usize)
pub fn scan_specs( &self, options: &ScanOptions, ) -> (Vec<UnpatchedGem>, usize, usize)
Scan gem specs against the advisory database.
Returns (unpatched_gems, version_parse_errors, advisory_load_errors).
Sourcepub fn scan_ruby(&self, options: &ScanOptions) -> (Vec<VulnerableRuby>, usize)
pub fn scan_ruby(&self, options: &ScanOptions) -> (Vec<VulnerableRuby>, usize)
Scan the Ruby interpreter version against the advisory database.
Returns (vulnerable_rubies, advisory_load_errors).
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin for Scanner
impl UnwindSafe for Scanner
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