2021-09-04 01:27:46 +05:30
|
|
|
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/secret_detection
|
|
|
|
#
|
|
|
|
# Configure the scanning tool through the environment variables.
|
|
|
|
# List of the variables: https://docs.gitlab.com/ee/user/application_security/secret_detection/#available-variables
|
|
|
|
# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables
|
|
|
|
|
|
|
|
variables:
|
2022-08-27 11:52:29 +05:30
|
|
|
SECURE_ANALYZERS_PREFIX: "$CI_TEMPLATE_REGISTRY_HOST/security-products"
|
2022-06-21 17:19:12 +05:30
|
|
|
SECRET_DETECTION_IMAGE_SUFFIX: ""
|
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
SECRETS_ANALYZER_VERSION: "4"
|
2021-09-04 01:27:46 +05:30
|
|
|
SECRET_DETECTION_EXCLUDED_PATHS: ""
|
|
|
|
|
|
|
|
.secret-analyzer:
|
|
|
|
stage: test
|
2022-06-21 17:19:12 +05:30
|
|
|
image: "$SECURE_ANALYZERS_PREFIX/secrets:$SECRETS_ANALYZER_VERSION$SECRET_DETECTION_IMAGE_SUFFIX"
|
2021-09-04 01:27:46 +05:30
|
|
|
services: []
|
|
|
|
allow_failure: true
|
2022-03-02 08:16:31 +05:30
|
|
|
variables:
|
|
|
|
GIT_DEPTH: "50"
|
2021-09-04 01:27:46 +05:30
|
|
|
# `rules` must be overridden explicitly by each child job
|
|
|
|
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
|
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
secret_detection: gl-secret-detection-report.json
|
|
|
|
|
|
|
|
secret_detection:
|
|
|
|
extends: .secret-analyzer
|
|
|
|
rules:
|
|
|
|
- if: $SECRET_DETECTION_DISABLED
|
|
|
|
when: never
|
|
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
script:
|
|
|
|
- /analyzer run
|