jenkinsci / jenkinsci/script-security-plugin
[JENKINS-52294] Cannot use index or range in sandboxed scripts
- Dominant language
- Java
- Stars
- 76
- Forks
- 181
- Avg merge
- 14h 55m
- Merged PRs (30d)
- 3
Description
At first, this issue looks like a duplicate of https://issues.jenkins-ci.org/browse/JENKINS-42618, but the difference here is the signature (object array instead of string):
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.Object[] groovy.lang.IntRange
The offending line:
version.split(/\./)[0..2]
Where version is a string. It seems like the split converts the string to an object array.
---
Originally reported by
towel, imported from: Cannot use index or range in sandboxed scripts
Raw content of original issue
At first, this issue looks like a duplicate of https://issues.jenkins-ci.org/browse/JENKINS-42618, but the difference here is the signature (object array instead of string):
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.Object[] groovy.lang.IntRange
The offending line:
version.split(/\./)[0..2]
Where version is a string. It seems like the split converts the string to an object array.
Contributor guide
Assessment
This issue has not been assessed yet.