Re: Jenkins test
Murrell, Brian
On Wed, 2022-03-02 at 17:29 -0800, dongfeier wrote:
Scripts not permitted to use staticMethodUltimately this means that some code in an untrusted shared library is trying to access a non-whitelisted groovy function. Administrators can decide whether to approve or reject thisYou *could* do the above with the security implications it involves, but the correct solution is to use whitelisted methods. Error when executing unsuccessful post condition:This is the method that is not whitelisted. atAnd this is where it's being called from. It's here: https://github.com/daos-stack/pipeline-lib/blob/03a6dd8f16808094e2ba2971e839707cd690c0a5/vars/notifyBrokenBranch.groovy#L37 It's the use of env[] that is the problem. One solution here is to move that function to the trusted library at: https://github.com/daos-stack/trusted-pipeline-lib But it seems a more correct solution is to replace the env[NAME] accesses to env."NAME" such as this (completely untested) PR does: https://github.com/daos-stack/pipeline-lib/pull/291 Cheers, b. |
|