Skip to main content

looks_like_secret_key

Function looks_like_secret_key 

pub fn looks_like_secret_key(key: &str) -> bool
Expand description

Heuristic for argument keys that should have their value redacted in human-readable summaries. Matches anywhere in the (lowercased) key: covers api_key, api-key, apiKey, oauth_token, secret, password, auth_token, bearer, client_secret, private_key, etc. Shared conservative heuristic for summary surfaces. A caller must still avoid rendering untrusted composite values by default.