Expand description
Scanner traits and configuration for the detection layer (L5).
This module provides file-system oriented scanning interfaces:
Scannertrait for scanning files and directoriesContentScannertrait for content-based scanningScannerConfigfor common scanner configuration
Structs§
- Scanner
Config - Common configuration shared by all scanners.
Constants§
- MAX_
FILE_ SIZE - Maximum size, in bytes, of a single file the scanner will read into memory.
Traits§
- Content
Scanner - Extended trait for scanners that support content-based scanning.
- Scanner
- Core trait for all security scanners.
Functions§
- oversize_
file_ finding - Builds a fail-loud diagnostic finding for a file skipped because it exceeded the size cap.
- read_
to_ string_ capped - Reads a file into a
String, refusing files larger thanMAX_FILE_SIZE. - read_
to_ string_ capped_ with_ limit - Reads a file into a
String, refusing to allocate for files larger thanlimitbytes.
Type Aliases§
- Progress
Callback - Type alias for progress callback function. Called each time a file is scanned to report progress. Uses Arc to allow cloning and sharing across threads.