Class SecretMasker

java.lang.Object
io.jenkins.plugins.batchcontrol.store.SecretMasker

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class SecretMasker extends Object
Masks secret material in config XML text BEFORE it is diffed or stored (SPEC item 9: "unified diff with secrets masked"). Both diff sides must be masked with the same rules so a secret can never leak through either side of a hunk.

Two rules:

  1. the text content of any element whose tag name contains password, secret, token (covers apiToken) or passphrase, case-insensitively;
  2. anything shaped like an encrypted Jenkins Secret payload ({AQ<base64>}), wherever it appears.