38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/dast/
|
|
|
|
# Configure the scanning tool through the environment variables.
|
|
# List of the variables: https://docs.gitlab.com/ee/user/application_security/dast/#available-variables
|
|
# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
- deploy
|
|
- dast
|
|
|
|
variables:
|
|
DAST_VERSION: 1
|
|
|
|
dast:
|
|
stage: dast
|
|
image:
|
|
name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION"
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
allow_failure: true
|
|
script:
|
|
- export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}
|
|
- if [ -z "$DAST_WEBSITE$DAST_API_SPECIFICATION" ]; then echo "Either DAST_WEBSITE or DAST_API_SPECIFICATION must be set. See https://docs.gitlab.com/ee/user/application_security/dast/#configuration for more details." && exit 1; fi
|
|
- /analyze
|
|
artifacts:
|
|
reports:
|
|
dast: gl-dast-report.json
|
|
only:
|
|
refs:
|
|
- branches
|
|
variables:
|
|
- $GITLAB_FEATURES =~ /\bdast\b/
|
|
except:
|
|
variables:
|
|
- $DAST_DISABLED
|
|
- $DAST_DISABLED_FOR_DEFAULT_BRANCH && $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME
|