jenkinsci / groovy-sandbox

(Deprecated) Compile-time transformer to run Groovy code in a restrictive sandbox
MIT License
123 stars 60 forks source link

Improve interception of unary operators and range expressions #77

Closed dwnusbaum closed 2 years ago

dwnusbaum commented 2 years ago

See also https://github.com/jenkinsci/script-security-plugin/pull/428.

The way that unary operators and range expressions are implemented by Groovy makes their runtime behavior opaque to the sandbox in some cases. This PR allows the sandbox to intercept these kinds of expressions appropriately.

dwnusbaum commented 2 years ago

Rebuilding to see if incrementals just magically work now after https://github.com/jenkins-infra/repository-permissions-updater/pull/2602.

dwnusbaum commented 2 years ago

I forgot that I only updated the Jenkinsfile in #76, so I updated it here as well in https://github.com/jenkinsci/groovy-sandbox/pull/77/commits/4eac49fd2bedee8976d488d3943933d0c8b84c9b. I think that should be enough to get incrementals working, but the ci.jenkins.io build queue has ~570 entries right now (a couple of BOM PRs are running), so we'll have to wait and see.