Skip to main content

redact_args

Function redact_args 

Source
pub fn redact_args(args: &[OsString]) -> Vec<String>
Expand description

Redact a command’s argv for display: mask secret-bearing values, mask the userinfo of a URL, and truncate long free text — see the module docs for the full policy. Returns one display string per input argument, in order. The policy is fail-closed: when in doubt it masks.

This is sequence-aware (the value after a sensitive flag is masked), so pass the whole argv, not one argument at a time.