Anyway to pass Exclude URLs & Include URLs in docker zap-baseline.py or zap-full-scan.py ?

305 views
Skip to first unread message

Rohit Kumar

unread,
Sep 25, 2022, 11:55:17 PM9/25/22
to OWASP ZAP User Group
Hi There,

I wanted to ask if there is anyway to pass list of Exclude URLs & Include URLs within zap docker python scripts.

I'm using these two commands

1. docker run -t owasp/zap2docker-stable zap-baseline.py -t https://www.example.com

2. docker run -t owasp/zap2docker-stable zap-full-scan.py -t https://www.example.com


I don't see any option to pass these details, i am allowed to use only these 2 scripts, any method please?

thc...@gmail.com

unread,
Sep 26, 2022, 3:16:29 AM9/26/22
to zaprox...@googlegroups.com
Hi.

Specify the context with the -n command line argument:
https://www.zaproxy.org/docs/docker/full-scan/#usage

You can also use the hooks to set up the context:
https://www.zaproxy.org/docs/docker/scan-hooks/

Best regards.

Lakshmi Narayana Inguva

unread,
Jan 18, 2024, 12:36:36 PM1/18/24
to ZAP User Group
Can you please show us the examples to use it for multiple URLs. I am using context file for authentication, but I don't see any coverage.

Simon Bennetts

unread,
Jan 19, 2024, 4:38:30 AM1/19/24
to ZAP User Group
Do you mean attacking multiple sites? For example https://www.example.com and https://www.example.org?
The packaged scans do not support that, we expect you to run a separate packaged scan for each site.
If you're looking for something more flexible have a look at the Automation Framework: https://www.zaproxy.org/docs/automate/automation-framework/

Cheers,

Simon

AppSec LN

unread,
Jan 19, 2024, 4:50:32 AM1/19/24
to ZAP User Group
No, 
For example https://www.example.com/page1,  https://www.example.com/page2,  https://www.example.com/page3 etc.

ZAP  full scan is not covering all pages even though the authentication is defined and all URLs included in the context file.

It seems automation is ready for authentication https://www.zaproxy.org/docs/getting-further/automation/.

Please share if there are any working examples.

Simon Bennetts

unread,
Jan 19, 2024, 7:22:09 AM1/19/24
to ZAP User Group
OK, that means that authentication is not working.
Have you tried it with the ZAP desktop? That will be easier to debug.

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages