Add timeout to web audit pipeline
This commit is contained in:
parent
02d67901c8
commit
2d26708e3b
|
@ -66,6 +66,11 @@ def call() {
|
|||
description: "Patron de formatage des données POST du formulaire d'authentification (si besoin). Exemple: username=%U&password=%P",
|
||||
defaultValue: ''
|
||||
)
|
||||
string(
|
||||
name: 'auditTimeout',
|
||||
description: "Délai maximum pour la réalisation de l'audit (en minutes)",
|
||||
defaultValue: '60'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -97,12 +102,13 @@ def call() {
|
|||
-e W3AF_AUTH_FORM_USERNAME_FIELD='${params.authFormUsernameField}'
|
||||
-e W3AF_AUTH_FORM_PASSWORD_FIELD='${params.authFormPasswordField}'
|
||||
"""
|
||||
|
||||
w3afImage.inside(dockerArgs) {
|
||||
sh 'mkdir -p reports'
|
||||
sh 'rm -f reports/*'
|
||||
sh 'envtpl -o audit.w3af /home/w3af/w3af/audit.w3af.tmpl'
|
||||
sh '/home/w3af/w3af/w3af_console -y -n -s audit.w3af'
|
||||
timeout(params.auditTimeout.toInteger()) {
|
||||
w3afImage.inside(dockerArgs) {
|
||||
sh 'mkdir -p reports'
|
||||
sh 'rm -f reports/*'
|
||||
sh 'envtpl -o audit.w3af /home/w3af/w3af/audit.w3af.tmpl'
|
||||
sh '/home/w3af/w3af/w3af_console -y -n -s audit.w3af'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue