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))}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t