Search code examples
zap

ZAP API scan context file format


I'm running the ZAP API scan script on a REST API but I have to host the Open API spec file on my own web server. When I run the scan it logs alerts against the URL where the spec is hosted, I would like to exclude it from the context. I saw that you can provide a context file using the following command line flag

-n context_file   context file which will be loaded prior to scanning the target

I was wondering where I could find the format of the context file?


Solution

  • Launch ZAP desktop, create the context with the details you want, export it and use it in your API scan.