Commit 62ce8c48 authored by Fabien Catteau's avatar Fabien Catteau Committed by Dmitriy Zaporozhets

Resolve "Add DAST authentication example"

parent c773f1f2
...@@ -14,7 +14,7 @@ called `dast`: ...@@ -14,7 +14,7 @@ called `dast`:
```yaml ```yaml
dast: dast:
image: owasp/zap2docker-stable image: registry.gitlab.com/gitlab-org/security-products/zaproxy
variables: variables:
website: "https://example.com" website: "https://example.com"
script: script:
...@@ -30,6 +30,27 @@ the tests on the URL defined in the `website` variable (change it to use your ...@@ -30,6 +30,27 @@ the tests on the URL defined in the `website` variable (change it to use your
own) and finally write the results in the `gl-dast-report.json` file. You can own) and finally write the results in the `gl-dast-report.json` file. You can
then download and analyze the report artifact in JSON format. then download and analyze the report artifact in JSON format.
It's also possible to authenticate the user before performing DAST checks:
```yaml
dast:
image: registry.gitlab.com/gitlab-org/security-products/zaproxy
variables:
website: "https://example.com"
login_url: "https://example.com/sign-in"
script:
- mkdir /zap/wrk/
- /zap/zap-baseline.py -J gl-dast-report.json -t $website \
--auth-url $login_url \
--auth-username "john.doe@example.com" \
--auth-password "john-doe-password" || true
- cp /zap/wrk/gl-dast-report.json .
artifacts:
paths: [gl-dast-report.json]
```
See [zaproxy documentation](https://gitlab.com/gitlab-org/security-products/zaproxy)
to learn more about authentication settings.
TIP: **Tip:** TIP: **Tip:**
Starting with [GitLab Ultimate][ee] 10.4, this information will Starting with [GitLab Ultimate][ee] 10.4, this information will
be automatically extracted and shown right in the merge request widget. To do be automatically extracted and shown right in the merge request widget. To do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment