DAST: Print more information when DAST cannot access the target
Release notes
TBD
Problem to solve
Our internal DAST pipeline has intermittent connection problems with the test target. This leaves us puzzled because subsequent DAST jobs don't report issues accessing the same target. See this example pipeline and failing job.
If the target is not reachable an error is printed:
2020-09-02 10:49:31,239 https://gitlab-review-masternigh-5tabn8.gitlab-review.app could not be reached, attempting scan anyway
The error message doesn't state the underlying problem. This makes the problem hard to debug. In particular when testing against a review app, which is automatically shutdown after DAST execution and no manual inspection is possible.
Intended users
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sam (Security Analyst)
- Simone (Software Engineer in Test)
User experience goal
Issues around DAST not being able to reach the target are easier to debug.
Proposal
Print the underlying exception to the job log, e.g. network-level (e.g. hostname could not be resolved or no route to host) or application-level (HTTP 4xx or 5xx) problems.
cc @gitlab-org/secure/dynamic-analysis-be