jenkinsci / jenkinsci/script-security-plugin
[JENKINS-56948] Whitelist Enum.valueOf()
- Dominant language
- Java
- Stars
- 76
- Forks
- 181
- Avg merge
- 14h 55m
- Merged PRs (30d)
- 3
Description
Using valueOf from known classes (Boolean.valueOf , etc.) are allowed (see source generic-whitelist).
But for custom Enum, we have to approve. Now because we cannot override valueOf, this method is very secure. Because we can't authorize all valueOf from all existing Enum in the world, we could just allow Enum.valueOf(Class enumType, String name).
---
Originally reported by antoinetran, imported from: Whitelist Enum.valueOf()
Raw content of original issue
Using valueOf from known classes (Boolean.valueOf , etc.) are allowed (see source generic-whitelist).
But for custom Enum, we have to approve. Now because we cannot override valueOf, this method is very secure. Because we can't authorize all valueOf from all existing Enum in the world, we could just allow Enum.valueOf(Class<T> enumType, String name).
- environment:
script-security-plugin 1.56 (latest as of now)
Contributor guide
Assessment
This issue has not been assessed yet.