pub struct ContainerScanner { /* private fields */ }Expand description
Scans Docker images for security issues.
Implementations§
Source§impl ContainerScanner
impl ContainerScanner
pub fn new(config: ContainerScanConfig) -> Self
Sourcepub fn docker_available() -> bool
pub fn docker_available() -> bool
Check if Docker is available.
Sourcepub fn inspect_image(image: &str) -> Option<Value>
pub fn inspect_image(image: &str) -> Option<Value>
Get image inspect JSON from Docker.
Sourcepub fn image_history(image: &str) -> Vec<HistoryEntry>
pub fn image_history(image: &str) -> Vec<HistoryEntry>
Get image history from Docker.
Sourcepub fn parse_image_info(inspect: &Value) -> Option<ImageInfo>
pub fn parse_image_info(inspect: &Value) -> Option<ImageInfo>
Parse image inspect JSON into ImageInfo.
Sourcepub fn scan_image(&self, image: &str) -> Vec<ScanResult>
pub fn scan_image(&self, image: &str) -> Vec<ScanResult>
Scan a Docker image for security issues.
Sourcepub async fn deep_scan_image(
&self,
image: &str,
scanners: &[Arc<dyn Scanner>],
) -> Vec<ScanResult>
pub async fn deep_scan_image( &self, image: &str, scanners: &[Arc<dyn Scanner>], ) -> Vec<ScanResult>
Scan a Docker image by saving and extracting its filesystem. This enables malware scanning of the actual file contents.
Auto Trait Implementations§
impl Freeze for ContainerScanner
impl RefUnwindSafe for ContainerScanner
impl Send for ContainerScanner
impl Sync for ContainerScanner
impl Unpin for ContainerScanner
impl UnsafeUnpin for ContainerScanner
impl UnwindSafe for ContainerScanner
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