-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Cannot Reproduce
-
Component/s: script-security-plugin
-
Labels:
-
Environment:Jenkins 1.658
-
Similar Issues:
-
Epic Link:
When attempting to run the expression new String(java.nio.file.Files.readAllBytes(java.nio.file.Paths.get("/some/path"))) in a sandboxed pipeline script, I get the following error:
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified staticMethod java.nio.file.Paths get java.lang.String
Also, no approval appears at /scriptApproval.
Same problem here on Jenkins 2.23. Static method is rejected, but does not show up in the 'In-process Script Approval' page. I even manually added 'staticMethod java.lang.Math round java.math.BigDecimal' as an approved signature to the script approval XML file and restarted Jenkins, but the method is still rejected.
Exception: