zed_util/
redact.rs

1/// Whether a given environment variable name should have its value redacted
2pub fn should_redact(env_var_name: &str) -> bool {
3    const REDACTED_SUFFIXES: &[&str] = &[
4        "KEY",
5        "TOKEN",
6        "PASSWORD",
7        "SECRET",
8        "PASS",
9        "CREDENTIALS",
10        "LICENSE",
11    ];
12    REDACTED_SUFFIXES
13        .iter()
14        .any(|suffix| env_var_name.ends_with(suffix))
15}