2022-01-26 12:08:38 +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:
|
2022-07-16 23:28:13 +05:30
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Security/Dast-API.latest.gitlab-ci.yml
|
2022-01-26 12:08:38 +05:30
|
|
|
|
|
|
|
# To use this template, add the following to your .gitlab-ci.yml file:
|
|
|
|
#
|
|
|
|
# include:
|
|
|
|
# template: DAST-API.latest.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
|
|
|
|
|
|
|
|
# Configure DAST API scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
|
|
|
|
# List of available variables: https://docs.gitlab.com/ee/user/application_security/dast_api/index.html#available-cicd-variables
|
|
|
|
|
|
|
|
variables:
|
|
|
|
# Setting this variable affects all Security templates
|
|
|
|
# (SAST, Dependency Scanning, ...)
|
2022-08-27 11:52:29 +05:30
|
|
|
SECURE_ANALYZERS_PREFIX: "$CI_TEMPLATE_REGISTRY_HOST/security-products"
|
2022-01-26 12:08:38 +05:30
|
|
|
#
|
2022-07-16 23:28:13 +05:30
|
|
|
DAST_API_VERSION: "2"
|
2022-06-21 17:19:12 +05:30
|
|
|
DAST_API_IMAGE_SUFFIX: ""
|
2022-07-16 23:28:13 +05:30
|
|
|
DAST_API_IMAGE: api-security
|
2022-01-26 12:08:38 +05:30
|
|
|
|
|
|
|
dast_api:
|
|
|
|
stage: dast
|
2022-06-21 17:19:12 +05:30
|
|
|
image: $SECURE_ANALYZERS_PREFIX/$DAST_API_IMAGE:$DAST_API_VERSION$DAST_API_IMAGE_SUFFIX
|
2022-01-26 12:08:38 +05:30
|
|
|
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
|
2022-06-21 17:19:12 +05:30
|
|
|
- if: $CI_COMMIT_BRANCH &&
|
|
|
|
$CI_GITLAB_FIPS_MODE == "true"
|
|
|
|
variables:
|
|
|
|
DAST_API_IMAGE_SUFFIX: "-fips"
|
2022-01-26 12:08:38 +05:30
|
|
|
- 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
|
2022-06-21 17:19:12 +05:30
|
|
|
|
|
|
|
# end
|