All:
I was working over the weekend to put together a script that would set up a new ZAP session and scan a specific URL (not an entire site). This is what I came up with:
The process is basically:
-Set up new session
-Call core.access_url to get the URL into the session. Doesn't recognize potential inbound parameters at this point
-Spider the URL with maxchildren=0, recurse=False, and subtreeonly=True. This gets ZAP to recognize some parameters that can be passed in.
-Sleep for a second (for some reason just waiting for the spider to finish doesn't seem to work)
-For each URL in the session (original, URL w/ parameters, a junk entry or two depending on URL path):
-Active scan with recurse=False
-Wait for all active scans to finish
This works reasonably well, but seems to have more steps than I'd expect. Just wanted to check with the group to see if anyone had a more elegant way to accomplish this.
Thanks,
Dan