mirror of
https://gitlab.com/components/sast.git
synced 2025-06-30 15:38:29 +02:00
Add stage input and remove "sast" job
This commit is contained in:
parent
0af2e866a5
commit
618e68d959
2 changed files with 18 additions and 20 deletions
|
@ -1 +1,6 @@
|
||||||
## SAST (Static Application Security Testing)
|
## SAST (Static Application Security Testing)
|
||||||
|
|
||||||
|
Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/sast/
|
||||||
|
|
||||||
|
Configure SAST 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/sast/index.html#available-cicd-variables
|
31
template.yml
31
template.yml
|
@ -1,8 +1,9 @@
|
||||||
# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/sast/
|
spec:
|
||||||
#
|
inputs:
|
||||||
# Configure SAST with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
|
stage:
|
||||||
# List of available variables: https://docs.gitlab.com/ee/user/application_security/sast/index.html#available-cicd-variables
|
default: test
|
||||||
|
|
||||||
|
---
|
||||||
variables:
|
variables:
|
||||||
# Setting this variable will affect all Security templates
|
# Setting this variable will affect all Security templates
|
||||||
# (SAST, Dependency Scanning, ...)
|
# (SAST, Dependency Scanning, ...)
|
||||||
|
@ -13,26 +14,18 @@ variables:
|
||||||
SAST_EXCLUDED_PATHS: "spec, test, tests, tmp"
|
SAST_EXCLUDED_PATHS: "spec, test, tests, tmp"
|
||||||
SCAN_KUBERNETES_MANIFESTS: "false"
|
SCAN_KUBERNETES_MANIFESTS: "false"
|
||||||
|
|
||||||
sast:
|
|
||||||
stage: test
|
|
||||||
artifacts:
|
|
||||||
reports:
|
|
||||||
sast: gl-sast-report.json
|
|
||||||
rules:
|
|
||||||
- when: never
|
|
||||||
variables:
|
|
||||||
SEARCH_MAX_DEPTH: 4
|
|
||||||
script:
|
|
||||||
- echo "$CI_JOB_NAME is used for configuration only, and its script should not be executed"
|
|
||||||
- exit 1
|
|
||||||
|
|
||||||
.sast-analyzer:
|
.sast-analyzer:
|
||||||
extends: sast
|
stage: $[[ inputs.stage ]]
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
# `rules` must be overridden explicitly by each child job
|
# `rules` must be overridden explicitly by each child job
|
||||||
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
|
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
|
||||||
|
variables:
|
||||||
|
SEARCH_MAX_DEPTH: 4
|
||||||
script:
|
script:
|
||||||
- /analyzer run
|
- /analyzer run
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
sast: gl-sast-report.json
|
||||||
|
|
||||||
bandit-sast:
|
bandit-sast:
|
||||||
extends: .sast-analyzer
|
extends: .sast-analyzer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue