When I attempt to run the following ZAP command on the terminal (Debian 10) :
docker run -v '$(pwd):/zap/wrk/:rw' -t owasp/zap2 docker-weekly zap-api-scan.py -t http://10.170.170.170:1700/account?field4= 4555666777888&"field7=GENERIC01"&"field10=ABC076 -f openapi -r ~/serverkeys/ZAP_Report.htm
I get an error :
docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid cha racters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. I f you intended to pass a host directory, use absolute path.
I am able to run the same commnad successfully from a Windows 10 terminal as below :
docker run -v "$(pwd):/zap/wrk/:rw" -t owasp/zap2docker-weekly zap-api-scan.py -t http://10.170.170.170:1700 /account?field4=4555666777888"&"field7=GENERIC01"&"field10=ABC076 -f openapi -r ZAP_Report.htm
What am I missing?
CodePudding user response:
Dont quote the mount argument, ie use docker run -v $(pwd):/zap/wrk/:rw
...
A working example is shown on https://www.zaproxy.org/docs/docker/baseline-scan/