jenkinsci / jenkinsci/script-security-plugin

[JENKINS-50305] sandbox should handle normal Groovy coercions

Open
#792 1 comment 0 reactions 0 assignees View on GitHub
component:script-security-plugin imported-jira-issue priority:major resolution:unresolved
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


  • status: Open
  • priority: Major
  • component(s): script-security-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-09

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.