Interview Prep/CI/CD/Jenkins Shared Libraries, Credentials and Security

The shared library must call a script that is not allowed by the Script Security sandbox. How do you proceed?

IntermediateScenarioJenkins Shared Libraries, Credentials and Security
Answer

Situation read → Sandbox blocks a method signature.

What I'd do →

  1. Prefer to avoid the call: use a built-in step or move logic into a shell script.
  2. Global libraries configured under System settings run outside the sandbox (trusted), so keep privileged helpers there with strict code review.
  3. Avoid approving arbitrary signatures in "In-process Script Approval"; approve only after reading each one.

Why → Script approval is a security boundary; bulk approval defeats it.

Interview tip → Trusted global library = full controller access, so protect it with CODEOWNERS.

All CI/CD questions

More on Jenkins Shared Libraries, Credentials and Security