Skip to main content

credential_line

Function credential_line 

Source
pub(crate) fn credential_line(text: &str) -> bool
Expand description

Does text look like it holds a credential (a key, a token, a private key, a header value, a password in an assignment or a URL)? It is then never typed: it would land in the shell’s history and the process list. The key and token shapes are the ones the app redacts logs with; the rest is for a command line. Errs towards refusing: the person can type it, or the agent can use a value the shell already has.