I have a specification file api.yaml As I understand I should use it like the following:
docker run -t owasp/zap2docker-weekly zap-api-scan.py -t api.yaml -f openapi
Should I put the file to some zap's directory?
It's more like a docker question: The file needs to be accessible inside the container, so you'll need to mount a volume (e.g. the folder containing this file) - check out the documentation for more details. Than, you can use the file using the mount point, for example:
docker run -v /path/to/dir:/app/config -t owasp/zap2docker-weekly zap-api-scan.py -t /app/config/api.yaml -f openapi
docker run -v /etc/hosts:/etc/hosts -v $(pwd):/zap/wrk:rw -t owasp/zap2docker-weekly zap-api-scan.py -t apitest.json -f openapi /etc/hosts': check out --add-host`, see the documentation here. Besides that, I glad I was able to help! If you need more Zap help don't hesitate to reach out!