Skip to main content

RECOMMENDED_REDACTION_PATTERNS

Constant RECOMMENDED_REDACTION_PATTERNS 

Source
pub const RECOMMENDED_REDACTION_PATTERNS: &[&str];
Expand description

The redaction_patterns value every shipped config and pvctl init write, so that redaction is on out of the box.

The engine only runs when redaction_patterns or redaction_paths is non-empty, and it always adds the pv-redact built-in patterns once it runs. This list therefore does two jobs: it turns the built-in set on, and it extends it with well-known credential formats the built-ins do not cover. Setting redaction_patterns = [] (with no redaction_paths) turns redaction off entirely.

Patterns use [0-9]/[A-Za-z] and (?-u:\b) for the same reason the built-ins do: \d and \b are Unicode-aware in the regex crate. None contains a single quote, so they can be written as TOML literal strings ('...') without escaping.