• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • script-security-plugin
    • None
    • Master: Win 7 64-bit
      Node: Win 10 64-bit
      Jenkins 2.46.2 (LTS)
      Script Security Plugin v1.27
      Warnings Plugin 4.62

      The following signature is pending, but still approved:

      : method java.util.regex.MatchResult group int

      The first time, I approved it so that it showed up in the "Signatures already approved" list. The next day, the same signature was pending again. After I approved it a couple of times, I tried to use "Approve assuming permission check" instead. Afterward, the signature was listed in "Signatures already approved" and in "Signatures already approved assuming permission check". But every day, this signature is pending again. Some of my jobs which are using this signature are working correctly. Other jobs using this signature are not working correctly because the permission is denied.

        1. Signature.PNG
          Signature.PNG
          41 kB
        2. parser.PNG
          parser.PNG
          41 kB
        3. job.PNG
          job.PNG
          54 kB

          [JENKINS-44332] Already approved signature still pending

          Nico Falk created issue -

          Nico Falk added a comment -

          It seems to be a problem on my node.

          The jobs running on the master are working. The jobs running on a node report the following:

           
          Scripts not permitted to use method java.util.regex.MatchResult group int. You will need to manually approve the call in the Script Approval UI.
           

          Nico Falk added a comment - It seems to be a problem on my node. The jobs running on the master are working. The jobs running on a node report the following:   Scripts not permitted to use method java.util.regex.MatchResult group int. You will need to manually approve the call in the Script Approval UI.  
          Nico Falk made changes -
          Environment Original: Win 7 64-bit
          Jenkins 2.46.2 (LTS)
          Script Security Plugin v1.27
          New: Master: Win 7 64-bit
          Node: Win 10 64-bit
          Jenkins 2.46.2 (LTS)
          Script Security Plugin v1.27

          Nico Falk added a comment -

          Found something similar in the warnings plugin issues: JENKINS-43813

          Not sure if the problem is located in this plugin or the warning plugin, because in my case the failing stuff is also from warnings plugin.

          Nico Falk added a comment - Found something similar in the warnings plugin issues:  JENKINS-43813 Not sure if the problem is located in this plugin or the warning plugin, because in my case the failing stuff is also from warnings plugin.

          Jesse Glick added a comment -

          Approve assuming permission check is certainly wrong for this method.

          As for the rest of it, not sure offhand. Possibly user error. Steps to reproduce from scratch?

          Jesse Glick added a comment - Approve assuming permission check is certainly wrong for this method. As for the rest of it, not sure offhand. Possibly user error. Steps to reproduce from scratch?

          Nico Falk added a comment -

          Thanks for the response.

          Steps to reproduce:

          1) Install latest warnings plugin

          2) Go to "Manage Jenkins" -> "Configure System" -> "Compiler Warnings"

          3) Add parser as shown in attached screenshot (parser.PNG)

          4) Generate freestyle job and add a build step (here: Windows batch) and post build action as shown in attached screenshot (job.PNG)

          5) Run the job on master (therefore, you can select "Restrict where this project can be run" to "master" in the job configuration)

          6) It should work (probably you need to approve permissions) and you should see the following console output:
          [WARNINGS] Parsing warnings in files 'foo.txt' with parser Dummy Parser
          [WARNINGS] Searching for all files in C:\Program Files (x86)\Jenkins\workspace\TestWarnings that match the pattern foo.txt
          [WARNINGS] Parsing 1 file in C:\Program Files (x86)\Jenkins\workspace\TestWarnings
          [WARNINGS] Successfully parsed file C:\Program Files (x86)\Jenkins\workspace\TestWarnings\foo.txt with 1 unique warning and 0 duplicates.
          [WARNINGS] Computing warning deltas based on reference build #9
          Finished: SUCCESS
          7) Change  "Restrict where this project can be run" to a node (yes, sorry, you need to have a node) and start the job again. Now, you always see a pending approval which was already approved. After approving, you can run the job again on the node and the signature needs approval again. The console output of the job is like:
          [WARNINGS] Parsing warnings in files 'foo.txt' with parser Dummy Parser
          [WARNINGS] Groovy sandbox rejected the parsing script for parser Dummy Parser: Scripts not permitted to use new hudson.plugins.warnings.parser.Warning java.lang.String int java.lang.String java.lang.String java.lang.String. You will need to manually approve the call in the Script Approval UI.
          [WARNINGS] Computing warning deltas based on reference build #8
          You see, that parsing the script was rejected!

          Let me know if you need further information.

          Thanks again!

           

           

          Nico Falk added a comment - Thanks for the response. Steps to reproduce: 1) Install latest warnings plugin 2) Go to "Manage Jenkins" -> "Configure System" -> "Compiler Warnings" 3) Add parser as shown in attached screenshot (parser.PNG) 4) Generate freestyle job and add a build step (here: Windows batch) and post build action as shown in attached screenshot (job.PNG) 5) Run the job on master (therefore, you can select "Restrict where this project can be run" to "master" in the job configuration) 6) It should work (probably you need to approve permissions) and you should see the following console output: [WARNINGS] Parsing warnings in files 'foo.txt' with parser Dummy Parser [WARNINGS] Searching for all files in C:\Program Files (x86)\Jenkins\workspace\TestWarnings that match the pattern foo.txt [WARNINGS] Parsing 1 file in C:\Program Files (x86)\Jenkins\workspace\TestWarnings [WARNINGS] Successfully parsed file C:\Program Files (x86)\Jenkins\workspace\TestWarnings\foo.txt with 1 unique warning and 0 duplicates. [WARNINGS] Computing warning deltas based on reference build #9 Finished: SUCCESS 7) Change  "Restrict where this project can be run" to a node (yes, sorry, you need to have a node) and start the job again. Now, you always see a pending approval which was already approved. After approving, you can run the job again on the node and the signature needs approval again. The console output of the job is like: [WARNINGS] Parsing warnings in files 'foo.txt' with parser Dummy Parser [WARNINGS] Groovy sandbox rejected the parsing script for parser Dummy Parser: Scripts not permitted to use new hudson.plugins.warnings.parser.Warning java.lang.String int java.lang.String java.lang.String java.lang.String. You will need to manually approve the call in the Script Approval UI. [WARNINGS] Computing warning deltas based on reference build #8 You see, that parsing the script was rejected! Let me know if you need further information. Thanks again!    
          Nico Falk made changes -
          Attachment New: job.PNG [ 38257 ]
          Nico Falk made changes -
          Attachment New: parser.PNG [ 38258 ]
          Nico Falk made changes -
          Environment Original: Master: Win 7 64-bit
          Node: Win 10 64-bit
          Jenkins 2.46.2 (LTS)
          Script Security Plugin v1.27
          New: Master: Win 7 64-bit
          Node: Win 10 64-bit
          Jenkins 2.46.2 (LTS)
          Script Security Plugin v1.27
          Warnings Plugin 4.62

          Jesse Glick added a comment -

          Possibly a bug in warnings.

          Jesse Glick added a comment - Possibly a bug in warnings .
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-43813 [ JENKINS-43813 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            nify Nico Falk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: