debian-mirror-gitlab/lib/gitlab/ci/templates/Jobs/SAST-IaC.latest.gitlab-ci.yml

35 lines
891 B
YAML
Raw Normal View History

2021-12-11 22:18:48 +05:30
variables:
# Setting this variable will affect all Security templates
# (SAST, Dependency Scanning, ...)
2022-05-07 20:08:51 +05:30
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/security-products"
2021-12-11 22:18:48 +05:30
SAST_EXCLUDED_PATHS: "spec, test, tests, tmp"
iac-sast:
stage: test
artifacts:
reports:
sast: gl-sast-report.json
rules:
- when: never
# `rules` must be overridden explicitly by each child job
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
variables:
SEARCH_MAX_DEPTH: 4
allow_failure: true
script:
- /analyzer run
kics-iac-sast:
extends: iac-sast
image:
name: "$SAST_ANALYZER_IMAGE"
variables:
2022-01-26 12:08:38 +05:30
SAST_ANALYZER_IMAGE_TAG: 1
2021-12-11 22:18:48 +05:30
SAST_ANALYZER_IMAGE: "$SECURE_ANALYZERS_PREFIX/kics:$SAST_ANALYZER_IMAGE_TAG"
rules:
- if: $SAST_DISABLED
when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /kics/
when: never
- if: $CI_COMMIT_BRANCH