How does Jenkins mask secrets in logs and what are its limits?
AdvancedConceptCredentials & security
Answer
When a credential is bound, Jenkins replaces occurrences of its exact value in the console output with ****. It does not mask transformed values: base64-encoded, URL-encoded, split across lines, or printed character by character. A malicious pipeline author can always exfiltrate a secret they can bind (for example by sending it to an external host). Masking prevents accidents, not attacks; access control on who can modify pipelines that use a credential is the real protection.
More on Credentials & security
What credential types does Jenkins support out of the box?BeginnerWhat is the difference between Global and System credential scope?IntermediateHow do folder-scoped credentials help multi-team controllers?IntermediateWhat authorization strategies are available?IntermediateWhat are the key permissions to understand in matrix auth?IntermediateWhat is the Groovy sandbox?Intermediate