Skip to main content

redact_command_for_logging

Function redact_command_for_logging 

Source
pub fn redact_command_for_logging(
    policy: &SecretBrokerPolicy,
    cmd: &str,
) -> String
Expand description

Redact secrets in a command string for safe logging.

Scans for patterns like KEY=value and replaces the value portion for any key that matches the secret broker policy. Also redacts inline -p password or --password password style arguments.