-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Jenkins 2.3 from Docker Hub, Pipeline Plugin 2.0
-
-
workflow-cps 2.67
When using
new GetMethod(url)
from
import org.apache.commons.httpclient.HttpClient
import org.apache.commons.httpclient.methods.GetMethod
directly in a Workflow script pasted into the UI, everything works as expected.
When the script is loaded with the file loader plugin during the Workflow script, the following error occurs:
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String
No pending script approval is generated.
- causes
-
JENKINS-57171 Permissive script security plugin is broken after updating to script security 1.58
-
- Closed
-
- is duplicated by
-
JENKINS-35199 Scripts not permitted to use method java.lang.String isEmpty
-
- Resolved
-
-
JENKINS-37378 Sandbox approval exceptions get hidden by try/catch pattern
-
- Resolved
-
-
JENKINS-40333 catchError disables Script Approval
-
- Resolved
-
-
JENKINS-41571 Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods count java.lang.String java.lang.String and no option to whitelist
-
- Resolved
-
-
JENKINS-48765 No script approval in post actions
-
- Closed
-
- relates to
-
JENKINS-33614 Link to script approval from build console
-
- Resolved
-
- links to
[JENKINS-34973] RejectedAccessException thrown but no pending script approval added
Description |
Original:
When using {{new GetMethod(url)}} from {{import org.apache.commons.httpclient.HttpClient import org.apache.commons.httpclient.methods.GetMethod}} directly in a Workflow script pasted into the UI, everything works as expected. When the script is loaded with the file loader plugin during the Workflow script, the following error occurs: {{org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String}} No pending script approval is generated. |
New:
When using {{new GetMethod(url)}} from {{import org.apache.commons.httpclient.HttpClient}} {{import org.apache.commons.httpclient.methods.GetMethod}} directly in a Workflow script pasted into the UI, everything works as expected. When the script is loaded with the file loader plugin during the Workflow script, the following error occurs: {{org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new org.apache.commons.httpclient.methods.GetMethod java.lang.String}} No pending script approval is generated. |
Summary | Original: Workflow scripts not permitted to use apache http client get method | New: RejectedAccessException thrown but no pending script approval added |
Epic Link | New: JENKINS-35391 [ 171184 ] |
Comment |
[ I have same problem using groovy.json.JsonSlurper().parse(url). How am I supposed to do that? ] |
Workflow | Original: JNJira [ 171177 ] | New: JNJira + In-Review [ 184209 ] |
Component/s | New: pipeline-general [ 21692 ] |
Component/s | Original: workflow-plugin [ 18820 ] |
Component/s | New: workflow-cps-plugin [ 21713 ] | |
Component/s | Original: pipeline [ 21692 ] |
Component/s | New: script-security-plugin [ 18520 ] |
Link |
New:
This issue is duplicated by |