`java.lang.SecurityException: Rejecting unsandboxed script` or `UnapprovedUsageException: script not yet approved for use`
IntermediateTroubleshootingCredentials, permissions & script approval
Answer
Likely causes → A pipeline configured with "Use Groovy Sandbox" unchecked (inline script) by a non-admin, so the whole script needs admin approval; or Job DSL scripts with script security enabled.
Diagnose → Job config sandbox checkbox; pending items in In-process Script Approval.
Fix → Enable the sandbox for the job, or have an admin review and approve the whole script (only for trusted content).
Prevent → Pipelines from SCM always use the sandbox; admin-only for unsandboxed scripts.
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