jenkinsci / jenkinsci/script-security-plugin

[JENKINS-43722] After cleaning approved script list, the previously approved scripts do not reappear

Open
#742 8 comments 0 reactions 0 assignees View on GitHub
component:envinject-plugin 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

Use case:

 



  1. We have a job containing a script that needs to be approved using the In-process Script Approval screen.

  2. We approve the script and we are able to execute the job without further problems.

  3. If we clear the approvals using the Script approval screen and we try to run the job that used it, it will fail (as expected)

  4. But we are not able to see the previously approved script among the pending scripts.



    1. If the job is in the Jenkins root, you can make the script appear again among the pending for approval script list if you go to manage Jenkins and click reload configuration from disk.

    2. If the job is inside a folder, the script will not appear as pending unless you restart Jenkins.



 

It does not seem an expected behavior.

 

For the test, we have been using:



  • Jenkins 1.651.3

  • Envinject Plugin 2.0 

  • Script Security Plugin 1.27

  • Used a freestyle job, that includes a boolean parameter defined by a groovy script:

         if (BOOLEAN_PARAM=="false") {

            def map = [KEY: true]

            return map

        }

 

The job then uses the param in a very simple way:

 

    echo "Hello World."

    echo “Parameter Passed = $BOOLEAN_PARAM"

    echo "KEY = $KEY"

---
Originally reported by mcardenasblanco, imported from: After cleaning approved script list, the previously approved scripts do not reappear


  • status: Open
  • priority: Major
  • component(s): envinject-plugin, script-security-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 8
  • imported: 2025-12-09

Raw content of original issue

Use case:
 



  1. We have a job containing a script that needs to be approved using the In-process Script Approval screen.

  2. We approve the script and we are able to execute the job without further problems.

  3. If we clear the approvals using the Script approval screen and we try to run the job that used it, it will fail (as expected)

  4. But we are not able to see the previously approved script among the pending scripts.



    1. If the job is in the Jenkins root, you can make the script appear again among the pending for approval script list if you go to manage Jenkins and click reload configuration from disk.

    2. If the job is inside a folder, the script will not appear as pending unless you restart Jenkins.



 
It does not seem an expected behavior.
 
For the test, we have been using:



  • Jenkins 1.651.3

  • Envinject Plugin 2.0 

  • Script Security Plugin 1.27

  • Used a freestyle job, that includes a boolean parameter defined by a groovy script:

         if (BOOLEAN_PARAM=="false") {
            def map = [KEY: true]
            return map
        }
 
The job then uses the param in a very simple way:
 
    echo "Hello World."
    echo “Parameter Passed = $BOOLEAN_PARAM"
    echo "KEY = $KEY"

environment

```
* Jenkins 1.651.3

* Envinject Plugin 2.0

* Script Security Plugin 1.27
```

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.