-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-68404] Add script listener to track usage #416
base: master
Are you sure you want to change the base?
Conversation
@daniel-beck jenkinsci/jenkins#6539 (comment) Let me know what you think. |
2338f9c
to
b9eafc1
Compare
src/main/java/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval.java
Outdated
Show resolved
Hide resolved
Extends listener introduced in jenkinsci/jenkins#6539 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#configuring
might be a good alternative to #using
because that can determine who the user actually submitting the script is. It also has ApprovalContext
which would probably remove the need for the API change.
A basic pipeline:
Once we've finalized the API here, looks like this needs a downstream change in |
Looks like this PR needs to be re-filed from an origin branch, or from the fork of a committer (e.g. me), to pick up the changes to the Jenkinsfile, so we have an incremental build of this. |
@daniel-beck I've replayed it with the updated Jenkinsfile. |
Cheater! (Thanks 😄) |
With jenkinsci/jenkins#7056 being merged, I will continue on this PR soon :) |
@meiswjn are you still planning to work on this? |
Since I would love to see this feature, yes. However, there are many other more pressing things right now, but I definitely want to do this. However, if someone stumbles upon this before I find time, feel free! |
2b65531
to
81eef7b
Compare
(Sorry for the noise, I thought this was an easy UI merge, but this was still on top of the old core PR 😬) |
This PR relates to jenkinsci/jenkins#6539 and https://issues.jenkins.io/browse/JENKINS-68404. It serves the purpose to track potentially dangerous usages of groovy scripts.
The script listener is called when a script is considered to be allowed to use. This also means that scripts running in a sandbox are not logged.