Added baseline feature with --baseline-file and --manage-baseline flags. Introduced --exclude option for skipping paths

This commit is contained in:
Mick Grove 2025-07-14 13:18:24 -07:00
commit 3520c5fba5
20 changed files with 401 additions and 21 deletions

View file

@ -111,9 +111,13 @@ pub struct ContentFilteringArgs {
#[arg(long("max-file-size"), default_value_t = 25.0)]
pub max_file_size_mb: f64,
/// Use custom path-based ignore rules from the given file(s)
#[arg(long, short, value_hint = ValueHint::FilePath)]
pub ignore: Vec<PathBuf>,
// /// Use custom path-based ignore rules from the given file(s)
// #[arg(long, short, value_hint = ValueHint::FilePath)]
// pub ignore: Vec<PathBuf>,
/// Skip any file or directory whose path matches this glob pattern. Multiple
/// patterns may be provided by repeating the flag.
#[arg(long, value_name = "PATTERN")]
pub exclude: Vec<String>,
/// If true, do NOT extract archive files
#[arg(long("no-extract-archives"), default_value_t = false)]

View file

@ -106,6 +106,14 @@ pub struct ScanArgs {
/// Bytes of context before and after each match
#[arg(long, default_value_t = 256, value_name = "BYTES")]
pub snippet_length: usize,
/// Baseline file to filter known secrets
#[arg(long, value_name = "FILE")]
pub baseline_file: Option<std::path::PathBuf>,
/// Create or update the baseline file with current findings
#[arg(long, default_value_t = false)]
pub manage_baseline: bool,
}
/// Confidence levels for findings