15 lines · 399 B · Rust
RawDownload
/// Whether a given environment variable name should have its value redactedpub fn should_redact(env_var_name: &str) -> bool {    const REDACTED_SUFFIXES: &[&str] = &[        "KEY",        "TOKEN",        "PASSWORD",        "SECRET",        "PASS",        "CREDENTIALS",        "LICENSE",    ];    REDACTED_SUFFIXES        .iter()        .any(|suffix| env_var_name.ends_with(suffix))}