Interview Prep/Jenkins/Credentials & security

A developer printed a credential with `echo $TOKEN | base64` and it appeared unmasked in the log. What do you do now and later?

IntermediateScenarioCredentials & security
Answer

Situation read → Masking only matches the exact value; the secret is exposed.

What I'd do →

  1. Rotate the credential immediately; treat it as compromised.
  2. Delete the affected build logs (or the builds) and check who viewed them.
  3. Tighten who can modify pipelines that bind that credential: folder-scoped credentials, PR review for Jenkinsfiles, no Replay for non-admins.
  4. Add a log scan (e.g. gitleaks over archived logs) for leaked patterns.

Why → Anyone who can run code with a secret can exfiltrate it; masking is not a control.

Interview tip → Say "rotate first, investigate second".

All Jenkins questions Roadmap: Jenkins

More on Credentials & security