Skip to main content

redact_token_shapes

Function redact_token_shapes 

Source
pub fn redact_token_shapes(text: &str) -> String
Expand description

Blanks credential-prefixed tokens that start a word, and PEM private keys, and nothing else: the two passes of redact_secrets that look for a secret by its shape alone, without its key: value passes. Unlike redact_secrets, a prefix inside a word does not count, so page text such as disk-usage-report-weekly (sk- inside disk-) comes back whole. Linear in the length of the text.