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 *Manage Jenkins ยป In-process Script Approval* where 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 Cheers On Thursday, 20 April 2017 10:08:29 UTC+1, Maciej Gawinecki wrote: > > Hi, > > 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: > > > > <approvedSignatures/> > ... > <pendingSignatures> > <pendingSignature> > <context/> > <signature>method java.net.URL openStream</signature> > <dangerous>true</dangerous> > </pendingSignature> > </pendingSignatures> > ... > </scriptApproval> > > > I have editted the script into > > <approvedSignatures> > <signature>method java.net.URL openStream</signature> > </approvedSignatures> > ... > </scriptApproval> > > but after Jenkins restart and re-running the pipeline it get overwritten. > > How do I approve pending signatures? > > Regards, > Maciej > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d7cbc30a-5dd6-455f-b72b-3407e4409ad0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.