How to use the ZAP GUI local API to scan a target
The ZAP API scan is a script included with the ZAP Docker images. It is optimized to scan APIs specified by OpenAPI, SOAP, or GraphQL through a local file or a URL. It imports the definition you give and then does an active scan of the URLs discovered. The ZAP API makes it possible to incorporate ZAP features into scripts and applications. In this recipe, we will walk through downloading the ZAP Docker image and then running it to scan against the Juice-Shop URL.
Getting ready
Docker will need to be installed as well as the ZAP Docker image. Be sure that the ZAP image is able to intercept requests and responses from the server to your browser. We will also be using the command line to run the image and kick off spidering and scanning. OWASP ZAP Desktop will also be needed:
https://www.docker.com/products/docker-desktop
How to do it…
ZAP API-based effective automated analysis can assist in identifying emerging flaws...