That's related to the plugin: https://wiki.jenkins-ci.org/display/JENKINS/Script+Security+Plugin therefore you can approve those functions/methods in the global settings.
An administrator may now go to ManageJenkins»In-process ScriptApprovalwhere a list of scripts pending approval will be shown.Assuming nothing dangerous-looking is being requested, just click Approve to let the script be run henceforth.
Then you don't need to change the xml manually and reboot Jenkins
On Thursday, 20 April 2017 10:08:29 UTC+1, Maciej Gawinecki wrote:
I have pipeline that downloads Groovy script from Git, but Groovy script fails with
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method java.net.URL openStream
I found /var/lib/jenkins/scriptApproval.xml file with the following excerpt: