-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand property accesses to getter/setter methods when applicable #7
Comments
Indeed. This comes from the fact that we rely on AST transformation to insert interceptors. Hence we generally do not know how the property access syntax like this is routed internally in Groovy. I think the possible next step from here is to let Groovy perform call site selection, then inspect the obtained The downside is that none of the |
I started thinking what the same approach would mean for method calls. On the regular method call side, most regular calls result in That would help us correctly identify that |
on the method call side, the method to create a call site is strangely defined in |
As https://github.com/jenkinsci/script-security-plugin/blob/b9d45a39f022f10ed0bc44d5c1aba2775fa74609/src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/groovy/SandboxInterceptorTest.java indicates, there are a whole lot of cases where the interceptor has no good way of knowing what |
It is annoying complication for a
GroovyInterceptor
implementation that a script calling, say,a.hostAddress
wherea
is anInetAddress
will be informed ofonGetProperty
with a property ofhostAddress
, when this is really just Groovy syntactic sugar. Would be more comfortable to receiveonMethodCall
ofgetHostAddress
, which is what is really happening.The text was updated successfully, but these errors were encountered: