pub struct ScanConfig {Show 17 fields
pub min_confidence: f64,
pub max_decode_depth: usize,
pub entropy_enabled: bool,
pub entropy_in_source_files: bool,
pub entropy_threshold: f64,
pub min_secret_len: usize,
pub max_file_size: u64,
pub dedup: DedupScope,
pub ml_enabled: bool,
pub ml_weight: f64,
pub unicode_normalization: bool,
pub decode_size_limit: usize,
pub max_matches_per_chunk: usize,
pub known_prefixes: Vec<String>,
pub secret_keywords: Vec<String>,
pub test_keywords: Vec<String>,
pub placeholder_keywords: Vec<String>,
}Expand description
Configuration for a scan run.
Fields§
§min_confidence: f64Minimum confidence (0.0 to 1.0) required to report a finding.
max_decode_depth: usizeMaximum recursive decoding depth (e.g. Base64(Hex(URL(secret)))).
entropy_enabled: boolWhether to enable Shannon entropy analysis for unknown high-entropy strings.
entropy_in_source_files: boolWhether to enable entropy analysis even in standard source code files.
entropy_threshold: f64Shannon entropy threshold (typical secrets are 4.5+).
min_secret_len: usizeMinimum length for entropy-based secret detection.
max_file_size: u64Maximum file size to scan (bytes). Large files are skipped or sampled.
dedup: DedupScopeDeduplication strategy.
ml_enabled: boolWhether to enable ML-based probabilistic gating.
ml_weight: f64Weight given to the ML score (0.0 to 1.0).
unicode_normalization: boolWhether to normalize Unicode characters before scanning.
decode_size_limit: usizeMaximum bytes allowed from recursive decoding.
max_matches_per_chunk: usizeMaximum matches allowed per chunk to prevent OOM.
known_prefixes: Vec<String>List of common secret prefixes to prioritize.
secret_keywords: Vec<String>List of keywords that strongly indicate a secret.
test_keywords: Vec<String>Keywords used in test environments.
placeholder_keywords: Vec<String>Keywords for placeholders and documentation.
Implementations§
Source§impl ScanConfig
impl ScanConfig
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate the configuration parameters.
Trait Implementations§
Source§impl Clone for ScanConfig
impl Clone for ScanConfig
Source§fn clone(&self) -> ScanConfig
fn clone(&self) -> ScanConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScanConfig
impl Debug for ScanConfig
Source§impl Default for ScanConfig
impl Default for ScanConfig
Source§impl<'de> Deserialize<'de> for ScanConfig
impl<'de> Deserialize<'de> for ScanConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ScanConfig
impl RefUnwindSafe for ScanConfig
impl Send for ScanConfig
impl Sync for ScanConfig
impl Unpin for ScanConfig
impl UnsafeUnpin for ScanConfig
impl UnwindSafe for ScanConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more