Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25804

Whitelisted signature presets for Java standard APIs and Jenkins core APIs

      Administrators often approve signatures for fundamental methods.

      • Ones in Java APIs like String.parseInt
      • Ones in Jenkins core like Result#isBetterThan

      It's not useful that administrators have to approve all those methods.
      And plugins would be preferred to provide methods returning primitive types.

      I want whitelisted signature presets.

          [JENKINS-25804] Whitelisted signature presets for Java standard APIs and Jenkins core APIs

          ikedam created issue -

          ikedam added a comment -

          The way to provide presets:

          • Built into script-security
          • Built into script-security and administrators can switch enabled/disabled.
            • For the case administrators want complete restriction.
          • script-security provides "import signatures from a file" and signature files are distributed on Wiki page.
            • For the case administrators don't want presets updated with plugin updates.

          ikedam added a comment - The way to provide presets: Built into script-security Built into script-security and administrators can switch enabled/disabled. For the case administrators want complete restriction. script-security provides "import signatures from a file" and signature files are distributed on Wiki page. For the case administrators don't want presets updated with plugin updates.

          Jesse Glick added a comment -

          The plugin already ships with a small static whitelist. It needs to be greatly expanded to cover clearly safe Java platform APIs (such as string manipulation), as well as neutral things in the Jenkins API. (Anything in the Jenkins API which calls checkPermission is generally OK to whitelist given a permissions check—this is a separate whitelist mode.)

          I think it is best to just have this default whitelist be bundled in the plugin, so we can use routine plugin updates to distribute it. And I see no reason to make it configurable. Either there is a known (or reasonably suspected) risk from some method in the standard whitelist, in which case it should be removed and a plugin update distributed as a regular security fix; or there is not, and it should be included. Administrators should not be expected to do the deep thinking.

          Jesse Glick added a comment - The plugin already ships with a small static whitelist. It needs to be greatly expanded to cover clearly safe Java platform APIs (such as string manipulation), as well as neutral things in the Jenkins API. (Anything in the Jenkins API which calls checkPermission is generally OK to whitelist given a permissions check—this is a separate whitelist mode.) I think it is best to just have this default whitelist be bundled in the plugin, so we can use routine plugin updates to distribute it. And I see no reason to make it configurable. Either there is a known (or reasonably suspected) risk from some method in the standard whitelist, in which case it should be removed and a plugin update distributed as a regular security fix; or there is not, and it should be included. Administrators should not be expected to do the deep thinking.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-25833 [ JENKINS-25833 ]
          ikedam made changes -
          Link New: This issue is related to JENKINS-27953 [ JENKINS-27953 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 12 (Web Link)" [ 12903 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-29541 [ JENKINS-29541 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-30520 [ JENKINS-30520 ]
          Patrick Wolf made changes -
          Labels New: followup
          Ulli Hafner made changes -
          Link New: This issue is related to JENKINS-35065 [ JENKINS-35065 ]

            Unassigned Unassigned
            ikedam ikedam
            Votes:
            11 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: