`org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods execute java.lang.String`
IntermediateTroubleshootingCredentials, permissions & script approval
Answer
Likely causes → Pipeline code uses "ls".execute() to run a process; in pipelines this runs on the controller, not the agent.
Diagnose → Search for .execute().
Fix → Replace with sh(script: 'ls', returnStdout: true). Never approve this signature: it allows arbitrary commands on the controller.
Prevent → Educate pipeline authors that Groovy runs on the controller; review approvals list.
More on Credentials, permissions & script approval
`ERROR: Could not find credentials entry with ID 'dockerhub'`BeginnerAPI call returns `HTTP ERROR 403 No valid crumb was included in the request`Beginner`Access Denied: alice is missing the Job/Build permission`BeginnerAfter enabling SSO, everyone sees `alice is missing the Overall/Read permission`AdvancedLocked out: SSO is down and nobody can log in to Jenkins to fix the realmAdvancedA pipeline using `withCredentials` prints `****` in places where the secret is not expected, breaking output parsingIntermediate