What is the Groovy sandbox?
IntermediateConceptCredentials & security
Answer
Pipeline scripts from Jenkinsfiles and untrusted libraries run in the Script Security sandbox, which allows only allowlisted method calls. Anything else throws RejectedAccessException: Scripts not permitted to use method ... and queues a signature for admin approval under Manage Jenkins > In-process Script Approval. The sandbox stops Jenkinsfile authors from calling Jenkins.instance, reading files on the controller or executing processes on it.
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