Skip to main content

Crate velka

Crate velka 

Source
Expand description

Velka — a fast, privacy-first secret scanner for codebases.

Detects leaked credentials, API keys, PII (CPF, CNPJ, SSN, IBAN, etc.) and sensitive tokens using regex rules, structural validation and an ML-enhanced confidence scoring ensemble.

§Quick start

// Scan a directory with default config
let findings = velka::scan(std::path::Path::new("."))?;
for sin in &findings {
    println!("{}: {} (line {})", sin.rule_id, sin.path, sin.line_number);
}

// Scan a string directly
let hits = velka::scan_str("aws_key = \"AKIA0000000000000000\"")?;
assert!(!hits.is_empty());

Re-exports§

pub use config::VelkaConfig;
pub use domain::ConfidenceLevel;
pub use domain::RiskLevel;
pub use domain::Severity;
pub use domain::Sin;
pub use domain::VerificationDetail;
pub use error::Result as VelkaResult;
pub use error::VelkaError;
pub use output::OutputFormat;
pub use output::RedactionConfig;

Modules§

config
domain
engine
error
output
ui
utils

Structs§

ScanOptions
Options for customizing scan behavior

Functions§

scan
Scan a directory for secrets using default configuration
scan_str
Scan a string directly for secrets (useful for testing and piped input).
scan_with_config
Scan a directory with a custom configuration
scan_with_options
Scan a directory with custom options (deep scan, complexity, diff/staged)