Skip to main content

contains_sensitive_data

Function contains_sensitive_data 

Source
pub fn contains_sensitive_data(text: &str) -> bool
Expand description

Returns true if text appears to contain sensitive data such as API keys, tokens, credentials, or PII.

This is a best-effort heuristic. False negatives are possible for heavily obfuscated values; false positives are minimised by requiring sufficient entropy/length in each pattern.