You suspect a malicious build exfiltrated data. What Jenkins evidence do you gather?
AdvancedScenarioCredentials & security
Answer
Situation read → Incident response on CI.
What I'd do →
- Preserve the build directory (
jobs/<job>/builds/<n>/): log,build.xml(cause, parameters), flow nodes. - Collect Audit Trail logs, Job Configuration History, and reverse proxy logs for the period.
- Check which credentials the job could bind and when the Jenkinsfile last changed (git history).
- Check agent pod/node logs and network egress logs (NetworkPolicy/firewall flow logs).
- Rotate every credential the job could access; restrict the job and review similar pipelines.
Why → Jenkins data plus network logs reconstruct who ran what with which secrets.
Interview tip → Mention egress restrictions on build agents as a preventive control.
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?IntermediateHow does Jenkins mask secrets in logs and what are its limits?AdvancedWhat authorization strategies are available?IntermediateWhat are the key permissions to understand in matrix auth?Intermediate