So i'm new to owasp zap and i was trying to test the api using owasp zap docker.
i tried using
where i made my own hook defined my own target and aditional api url and change few configuration deleted the configuration not needed for project.
i used this command : docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py \
-t <api-url> -z -config api.key=<somekey i put inside zap.py> -r testreport.html --hook=zap.py
but im getting this error :
requests.exceptions.ProxyError: HTTPConnectionPool(host='0.0.0.0', port=8098): Max retries exceeded with url:
http://zap/JSON/core/action/loadSession/?name=Apisession&apikey=<key> (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe172aae790>: Failed to establish a new connection: [Errno 111] Connection refused')))
The firewall is off so i dont think that is an issue.