SECURITY-218: Update to latest cli-shutdown.groovy
Update to the latest version of the script:
3b8e932110/cli-shutdown.groovy
Change-Id: Ief950cffb24229aea8cbcabf62d3339aca6c9630
This commit is contained in:
parent
390d82fc09
commit
953fcaf25c
@ -30,6 +30,7 @@ THE SOFTWARE.
|
||||
|
||||
import jenkins.*;
|
||||
import jenkins.model.*;
|
||||
import hudson.model.*;
|
||||
|
||||
// disabled CLI access over TCP listener (separate port)
|
||||
def p = AgentProtocol.all()
|
||||
@ -38,5 +39,9 @@ p.each { x ->
|
||||
}
|
||||
|
||||
// disable CLI access over /cli URL
|
||||
def removal = { lst ->
|
||||
lst.each { x -> if (x.getClass().name.contains("CLIAction")) lst.remove(x) }
|
||||
}
|
||||
def j = Jenkins.instance;
|
||||
j.actions.each { x -> if (x.getClass().name.contains("CLIAction")) j.actions.remove(x) }
|
||||
removal(j.getExtensionList(RootAction.class))
|
||||
removal(j.actions)
|
||||
|
Loading…
x
Reference in New Issue
Block a user