debian-mirror-gitlab/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml

39 lines
1.2 KiB
YAML
Raw Normal View History

2019-09-04 21:01:54 +05:30
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/dast/
2019-07-07 11:18:12 +05:30
# Configure the scanning tool through the environment variables.
2020-04-22 19:07:51 +05:30
# List of the variables: https://docs.gitlab.com/ee/user/application_security/dast/#available-variables
2019-07-07 11:18:12 +05:30
# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables
stages:
- build
- test
- deploy
- dast
2020-03-13 15:44:24 +05:30
variables:
DAST_VERSION: 1
2019-07-07 11:18:12 +05:30
dast:
stage: dast
2019-09-04 21:01:54 +05:30
image:
2020-03-13 15:44:24 +05:30
name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION"
2019-07-07 11:18:12 +05:30
variables:
2020-04-08 14:13:33 +05:30
GIT_STRATEGY: none
2019-07-07 11:18:12 +05:30
allow_failure: true
script:
- export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}
2020-04-22 19:07:51 +05:30
- 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
2019-07-07 11:18:12 +05:30
artifacts:
reports:
dast: gl-dast-report.json
only:
refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\bdast\b/
except:
variables:
- $DAST_DISABLED
2019-12-21 20:55:43 +05:30
- $DAST_DISABLED_FOR_DEFAULT_BRANCH && $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME