jenkinsci / jenkinsci/script-security-plugin
[JENKINS-50305] sandbox should handle normal Groovy coercions
- Dominant language
- Java
- Stars
- 76
- Forks
- 181
- Avg merge
- 14h 55m
- Merged PRs (30d)
- 3
Description
I have a custom pipeline step whose signature is (boolean, String, List), and I'm trying to use a chained call.
Due to a bug in CPS, it's trying to pass Integer, GStringImpl, ArrayList, but in the event of the actual Groovy call this should succeed--anything can be run through `asBoolean()`, and GStrings are transparently coerced to regular strings.
I'm not sure how challenging supporting this correctly would be, but these coercions (particularly GStrings) shouldn't trigger the sandbox.
---
Originally reported by
chrylis, imported from: sandbox should handle normal Groovy coercions
Raw content of original issue
I have a custom pipeline step whose signature is (boolean, String, List<String>), and I'm trying to use a chained call.
Due to a bug in CPS, it's trying to pass Integer, GStringImpl, ArrayList, but in the event of the actual Groovy call this should succeed--anything can be run through `asBoolean()`, and GStrings are transparently coerced to regular strings.
I'm not sure how challenging supporting this correctly would be, but these coercions (particularly GStrings) shouldn't trigger the sandbox.
Contributor guide
Assessment
This issue has not been assessed yet.