ZAP Automation through jenkins

100 views
Skip to first unread message

Steve132

unread,
Nov 25, 2019, 8:48:08 PM11/25/19
to ZAP Jenkins Plugin
Hi All,

I am automating ZAP dynamic scanning through build pipline. I have a SPA application and API running on a different domains in the backend. I want to automate dynamic scanning for this requirement.

What is the best way to do it?
1)Scan frontend and APIs seperately or
2)Capture API request through frontend and scan it in one go?

Please advise.

Peter Hauschulz

unread,
Nov 26, 2019, 4:03:03 AM11/26/19
to ZAP Jenkins Plugin
The 'best' way to do it depends on what you are looking for! 

How often are these scans going to be run? 
How often is the API built and updated with the same frontend, and vice versa?


My first instinct is to do all of it at once, but the scans may be prohibitively long depending on what kind of release schedule you are trying to support!

Steve132

unread,
Nov 26, 2019, 8:21:43 PM11/26/19
to ZAP Jenkins Plugin
Hi Peter,

Thanks for quick reply,

We have multiple development team developing micro services for our application, and we need to scan these API on regular basis.

I think breaking the scans and scan different layers might help me.

I was looking to implement authenticated API scans through ZAP jenking plugin.

Could you please help me with command to override host for openAPI.

Regards,
Steve

Peter Hauschulz

unread,
Nov 27, 2019, 2:27:42 AM11/27/19
to ZAP Jenkins Plugin
Hmm, I'm not sure how much I can help there. 

I don't use the Jenkins plugin anymore...it's a handy quick tool, but not very flexible and it sounds like your specific case might require more fine tuning than it offers. 

What I do is use Jenkins to build a ZAP daemon via shell command, and then issue commands to the waiting ZAP API. 

Not sure if that helps!

Steve132

unread,
Nov 27, 2019, 6:44:35 PM11/27/19
to ZAP Jenkins Plugin
Hi Peter,

Thats true, Jenkins plugin is not flexible to run the scans, I think I have to use ZAP API. Do you have documentation on how you have used it?

Thanks,
Steve

Simon Bennetts

unread,
Nov 28, 2019, 4:19:34 AM11/28/19
to ZAP Jenkins Plugin
They do all of the standard things, and can be extended via hooks: https://github.com/zaproxy/zaproxy/blob/develop/docker/docs/scan-hooks.md
Reply all
Reply to author
Forward
0 new messages