Your script approval list contains `method hudson.model.Run getLog` and `staticMethod jenkins.model.Jenkins getInstance`. What do you do?
AdvancedScenarioCredentials & security
Answer
Situation read → These approvals give every Jenkinsfile author access to Jenkins internals: Jenkins.getInstance leads to credentials and configuration.
What I'd do →
- Find which pipelines use them (search Jenkinsfiles and recent
RejectedAccessExceptionhistory). - Replace with safe alternatives: library steps that do the specific job, or plugin steps.
- Revoke the dangerous approvals in
In-process Script Approval. - Audit recent builds for abuse; rotate high-value credentials if exploitation is plausible.
Why → Approving internal API access effectively makes all pipeline authors admins.
Interview tip → Demonstrate that you know which signatures are dangerous, not just "approve carefully".
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