ICTU / zap2docker-auth-weekly

Zap baseline scanner in Docker with authentication
Apache License 2.0
104 stars 70 forks source link

Add config to wait for a page to load before storing cookies #40

Closed Top-Cat closed 2 years ago

Top-Cat commented 2 years ago

Instead of the current hardcoded 5 second wait between submitting the form and storing session information this PR adds two extra options:

  1. Change the delay time
  2. Provide an xpath for an element that is present when logged in

This means that we can accommodate a larger range of response times. Sometimes our cloud-hosted apps need to be booted from cold which can take longer than the 5 seconds allotted here, other times they can respond much faster. By specifying an element to wait for we can wait for longer when we need to and wait for less time when possible.

It may be desirable to match the options here to work similarly to username/password where a name or id can be provided but we're likely not searching for input fields here and xpath is more often going to be the preferred method.

dicksnel commented 2 years ago

Thanks!