2021-09-30 23:02:18 +05:30
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Security/Dast-API.gitlab-ci.yml
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
# To use this template, add the following to your .gitlab-ci.yml file:
|
|
|
|
#
|
|
|
|
# include:
|
|
|
|
# template: DAST-API.gitlab-ci.yml
|
|
|
|
#
|
|
|
|
# You also need to add a `dast` stage to your `stages:` configuration. A sample configuration for DAST API:
|
|
|
|
#
|
|
|
|
# stages:
|
|
|
|
# - build
|
|
|
|
# - test
|
|
|
|
# - deploy
|
|
|
|
# - dast
|
|
|
|
|
|
|
|
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/dast_api/index.html
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
# Configure DAST API scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
|
2021-09-04 01:27:46 +05:30
|
|
|
# List of available variables: https://docs.gitlab.com/ee/user/application_security/dast_api/index.html#available-cicd-variables
|
2021-06-08 01:23:25 +05:30
|
|
|
|
|
|
|
variables:
|
|
|
|
# Setting this variable affects all Security templates
|
|
|
|
# (SAST, Dependency Scanning, ...)
|
|
|
|
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
|
|
|
|
#
|
|
|
|
DAST_API_VERSION: "1"
|
|
|
|
DAST_API_IMAGE: $SECURE_ANALYZERS_PREFIX/api-fuzzing:$DAST_API_VERSION
|
|
|
|
|
|
|
|
dast_api:
|
|
|
|
stage: dast
|
|
|
|
image: $DAST_API_IMAGE
|
|
|
|
allow_failure: true
|
|
|
|
rules:
|
|
|
|
- if: $DAST_API_DISABLED
|
|
|
|
when: never
|
|
|
|
- if: $DAST_API_DISABLED_FOR_DEFAULT_BRANCH &&
|
|
|
|
$CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME
|
|
|
|
when: never
|
|
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
script:
|
|
|
|
- /peach/analyzer-dast-api
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- gl-assets
|
|
|
|
- gl-dast-api-report.json
|
|
|
|
- gl-*.log
|
|
|
|
reports:
|
|
|
|
dast: gl-dast-api-report.json
|