-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Groovy plugin 2.0, Jenkins 2.42.1
Prior to the 2.0 upgrade, we had a set of system groovy script steps in jobs to do maintenance on the server (walk machines and clean tmp folders, etc.)
After 2.0, because everything is run under the sandbox, to run these scenarios, I need to whitelist a bunch of methods. However, a lot of these methods aren't ones I would like to whitelist (hudson.getInstance, etc.) because then other cases like job DSL could use them maliciously.
Is there a way I can set up the system groovy step to not do method checks for specific jobs?
So if you use the newest plugin, but disable the sandbox. We then use the Authorize Project plugin to ensure jobs are run by default as non-admin. This will cause the plugin to still ask for approval when running the job on periodic/automatic triggers, but it will approve the entire script rather than individual signatures.