Report is not generating for openapi using docker

34 views
Skip to first unread message

jijesh vu

unread,
Jan 24, 2023, 4:10:04 AM1/24/23
to OWASP ZAP User Group
#!/bin/bash
docker run --name ZAP -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-api-scan.py -r /Users/jijesh/ZAP/report_html -t https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json -f openapi

im using openapi for testing and the reports are not generating.

Simon Bennetts

unread,
Jan 24, 2023, 4:16:55 AM1/24/23
to OWASP ZAP User Group
ZAP will be generating the report.
But its writing the report to the directory you specify in the docker image, which is "/Users/jijesh/ZAP/report_html"
That file will not be accessible when the image finishes - thats a docker restriction and so not one we can change.
You have mapped your CWD to "/zap/wrk" - thats the only directory under which you'll be able to access files.
So change to use "-r /zap/wrk/report_html"

Cheers,

Simon

jijesh vu

unread,
Jan 24, 2023, 5:09:56 AM1/24/23
to OWASP ZAP User Group
It worked, Thank you so much

Simon Bennetts

unread,
Jan 24, 2023, 5:12:25 AM1/24/23
to OWASP ZAP User Group
Thanks for letting us know!
This has happened a few times so maybe we should try to detect this case in the scripts and warn people...

Cheers,

Simon

jijesh vu

unread,
Jan 24, 2023, 6:38:31 AM1/24/23
to OWASP ZAP User Group
wow sounds great.
One more thing, how can i specify the include, exclude for the generated reports.

Reply all
Reply to author
Forward
0 new messages