2019-05-21 00:06:47 +00:00
|
|
|
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/dast/
|
2019-03-08 03:39:35 +00:00
|
|
|
|
|
|
|
# Configure the scanning tool through the environment variables.
|
2020-04-06 12:10:44 +00:00
|
|
|
# List of the variables: https://docs.gitlab.com/ee/user/application_security/dast/#available-variables
|
2019-03-08 03:39:35 +00:00
|
|
|
# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
- dast
|
|
|
|
|
2020-01-16 12:08:32 +00:00
|
|
|
variables:
|
|
|
|
DAST_VERSION: 1
|
|
|
|
|
2019-03-08 03:39:35 +00:00
|
|
|
dast:
|
2019-04-06 16:02:04 +00:00
|
|
|
stage: dast
|
2019-05-21 00:06:47 +00:00
|
|
|
image:
|
2020-01-16 12:08:32 +00:00
|
|
|
name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION"
|
2019-04-06 16:02:04 +00:00
|
|
|
variables:
|
2020-02-21 06:08:58 +00:00
|
|
|
GIT_STRATEGY: none
|
2019-04-06 16:02:04 +00:00
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}
|
2020-04-06 12:10:44 +00:00
|
|
|
- /analyze
|
2019-04-06 16:02:04 +00:00
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
dast: gl-dast-report.json
|
2019-03-08 03:39:35 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- branches
|
2019-04-06 16:02:04 +00:00
|
|
|
variables:
|
|
|
|
- $GITLAB_FEATURES =~ /\bdast\b/
|
2019-03-08 03:39:35 +00:00
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $DAST_DISABLED
|
2019-10-18 06:07:02 +00:00
|
|
|
- $DAST_DISABLED_FOR_DEFAULT_BRANCH && $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME
|