Created
October 8, 2019 20:06
-
-
Save jwkidd3/30010634ddcbda92046eed25be2d78c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
script { | |
try { | |
// Context import fails if it already exists | |
sh 'zap-cli --zap-url zap -p 8000 --api-key 5364864132243598723485 --port 8000 context import /zap/data/WebGoat.context' | |
} | |
catch (Exception e) { | |
} | |
} | |
script { | |
try { | |
// If it finds results, returns error code, but we still want to publish the report | |
sh 'zap-cli --zap-url zap -p 8000 --api-key 5364864132243598723485 quick-scan -c WebGoat -u tester -s all --spider -r http://webgoat:8080/WebGoat' | |
} | |
catch (Exception e) { | |
} | |
} | |
sh 'zap-cli --zap-url zap -p 8000 --api-key 5364864132243598723485 report -o zap_report.html -f html' | |
publishHTML([ | |
allowMissing: false, | |
alwaysLinkToLastBuild: false, | |
keepAll: false, | |
reportDir: '', | |
reportFiles: 'zap_report.html', | |
reportName: 'ZAP DAST Report', | |
reportTitles: '' | |
]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment