-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/jenkins][improvement] - Add option to add scriptapproval hashes value on helm chart #23265
Comments
@wmcdona89: GitHub didn't allow me to assign the following users: jessicaodish. Note that only helm members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I will be working on a PR for this. |
@ricardojdsilva87 have you tried configuring via JCasC? It currently only supports signatures but perhaps it results in the desired behavior.
|
Hello @wmcdona89 ,
With this the scriptApproval.xml file is created here: And copied to the final location here: Our setup is now based on an EFS storage and the Jenkins pod has ephemeral storage. This is what triggered this "issue" since before we had an EBS and we thought that just having this piece of code on the values.yaml file would be enough. Thanks |
@ricardojdsilva87 what version of the script-security plugin are you using? I see v1.27 is hardcoded in the chart here. This version was released Feb 27, 2017 and v1.74 is the latest. Perhaps this is contributing to the issue. Looking at one of my scriptApproval.xml files on Jenkins v2.222.4, I see only signatures. So perhaps hashes are only generated for more complex signatures. *These approvals were done through the UI (not the chart). <?xml version='1.1' encoding='UTF-8'?>
<scriptApproval plugin="script-security@1.73">
<approvedScriptHashes/>
<approvedSignatures>
<string>new java.lang.StringBuilder</string>
</approvedSignatures>
<aclApprovedSignatures/>
<approvedClasspathEntries/>
<pendingScripts/>
<pendingSignatures/>
<pendingClasspathEntries/>
</scriptApproval> |
Hello @wmcdona89 , |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
📢 |
Hello this would be a request for improvement,
We currently are running Jenkins with no persistent storage, with everything configured via CASC.
We have a few script that need to be approved at startup to be used right away. Thing here is even though the scripts are declared in the scriptApproval helm value, after every deployment the script asks to be approved again.
Doing some tests I've checked that the approvedSignatures xml tag is not as important as the approvedScriptHashes.
After every manual approval I've noticed that the hash is always the same (if the script doesn't change). Implementing this feature would bring more benefits than having just the approvedSignatures in place
The file where is set:
https://github.com/helm/charts/blob/master/stable/jenkins/templates/config.yaml#L129
Having something like the following would help alot:
This way every script approval could be managed directly under the Values file.
Thank you for the help
The text was updated successfully, but these errors were encountered: