Exclude URL in ZAP proxy scanning run as daemon

Viewed 1723

How can I exclude certain URL from ZAP proxy scanning when starting it in daemon mode with following command:

zap.sh -daemon -host 0.0.0.0 -port 8090 -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.disablekey=true

Is there any argument or config parameter I can set to exclude certain URLs?

I'm using official docker image owasp/zap2docker-stable:latest.

1 Answers

For anyone who has the same issue the solution is to use following argument in the start command:

-config globalexcludeurl.url_list.url.regex='^((?!http:\/\/example\.com\/).*)$'

In this example it will ignore all urls except the one that begin with http://example.com/.

Related