org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException:
脚本不允许使用 groovy.lang.GroovyObject 方法
获取财产
java.lang.String (com.cccis.telematics.build.Templates.run_jgitflow_template)
在 org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod
(静态白名单.java:180)
这里发生的情况是,该属性在相关对象上并不存在,因此 Groovy 开始内省该对象以查找它。我认为允许内省可能会导致安全漏洞。
重现:
class Foo
{
String FOOSPRoperty
}
def a_method()
{
Foo f = new Foo()
f.foosPROPERTY.replace( "x", "y" )
}