Commit c442612b authored by Matija Čupić's avatar Matija Čupić

Merge branch 'rf-update-sast-vendored-template' into 'master'

Removes SAST_DEFAULT_ANALYZERS variable

See merge request gitlab-org/gitlab!63538
parents ef73225f aa31a30a
...@@ -8,7 +8,6 @@ variables: ...@@ -8,7 +8,6 @@ variables:
# (SAST, Dependency Scanning, ...) # (SAST, Dependency Scanning, ...)
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers" SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
SAST_DEFAULT_ANALYZERS: "bandit, brakeman, gosec, spotbugs, flawfinder, phpcs-security-audit, security-code-scan, nodejs-scan, eslint, sobelow, pmd-apex, kubesec, mobsf, semgrep"
SAST_EXCLUDED_ANALYZERS: "" SAST_EXCLUDED_ANALYZERS: ""
SAST_EXCLUDED_PATHS: "spec, test, tests, tmp" SAST_EXCLUDED_PATHS: "spec, test, tests, tmp"
SCAN_KUBERNETES_MANIFESTS: "false" SCAN_KUBERNETES_MANIFESTS: "false"
...@@ -49,8 +48,7 @@ bandit-sast: ...@@ -49,8 +48,7 @@ bandit-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /bandit/ - if: $SAST_EXCLUDED_ANALYZERS =~ /bandit/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /bandit/
exists: exists:
- '**/*.py' - '**/*.py'
...@@ -69,8 +67,7 @@ brakeman-sast: ...@@ -69,8 +67,7 @@ brakeman-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /brakeman/ - if: $SAST_EXCLUDED_ANALYZERS =~ /brakeman/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /brakeman/
exists: exists:
- '**/*.rb' - '**/*.rb'
- '**/Gemfile' - '**/Gemfile'
...@@ -90,8 +87,7 @@ eslint-sast: ...@@ -90,8 +87,7 @@ eslint-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /eslint/ - if: $SAST_EXCLUDED_ANALYZERS =~ /eslint/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /eslint/
exists: exists:
- '**/*.html' - '**/*.html'
- '**/*.js' - '**/*.js'
...@@ -114,8 +110,7 @@ flawfinder-sast: ...@@ -114,8 +110,7 @@ flawfinder-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /flawfinder/ - if: $SAST_EXCLUDED_ANALYZERS =~ /flawfinder/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /flawfinder/
exists: exists:
- '**/*.c' - '**/*.c'
- '**/*.cpp' - '**/*.cpp'
...@@ -136,7 +131,6 @@ kubesec-sast: ...@@ -136,7 +131,6 @@ kubesec-sast:
- if: $SAST_EXCLUDED_ANALYZERS =~ /kubesec/ - if: $SAST_EXCLUDED_ANALYZERS =~ /kubesec/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH &&
$SAST_DEFAULT_ANALYZERS =~ /kubesec/ &&
$SCAN_KUBERNETES_MANIFESTS == 'true' $SCAN_KUBERNETES_MANIFESTS == 'true'
gosec-sast: gosec-sast:
...@@ -154,8 +148,7 @@ gosec-sast: ...@@ -154,8 +148,7 @@ gosec-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /gosec/ - if: $SAST_EXCLUDED_ANALYZERS =~ /gosec/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /gosec/
exists: exists:
- '**/*.go' - '**/*.go'
...@@ -178,7 +171,6 @@ mobsf-android-sast: ...@@ -178,7 +171,6 @@ mobsf-android-sast:
- if: $SAST_EXCLUDED_ANALYZERS =~ /mobsf/ - if: $SAST_EXCLUDED_ANALYZERS =~ /mobsf/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH &&
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true' $SAST_EXPERIMENTAL_FEATURES == 'true'
exists: exists:
- '**/*.apk' - '**/*.apk'
...@@ -192,7 +184,6 @@ mobsf-ios-sast: ...@@ -192,7 +184,6 @@ mobsf-ios-sast:
- if: $SAST_EXCLUDED_ANALYZERS =~ /mobsf/ - if: $SAST_EXCLUDED_ANALYZERS =~ /mobsf/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH &&
$SAST_DEFAULT_ANALYZERS =~ /mobsf/ &&
$SAST_EXPERIMENTAL_FEATURES == 'true' $SAST_EXPERIMENTAL_FEATURES == 'true'
exists: exists:
- '**/*.ipa' - '**/*.ipa'
...@@ -213,8 +204,7 @@ nodejs-scan-sast: ...@@ -213,8 +204,7 @@ nodejs-scan-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /nodejs-scan/ - if: $SAST_EXCLUDED_ANALYZERS =~ /nodejs-scan/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /nodejs-scan/
exists: exists:
- '**/package.json' - '**/package.json'
...@@ -233,8 +223,7 @@ phpcs-security-audit-sast: ...@@ -233,8 +223,7 @@ phpcs-security-audit-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /phpcs-security-audit/ - if: $SAST_EXCLUDED_ANALYZERS =~ /phpcs-security-audit/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /phpcs-security-audit/
exists: exists:
- '**/*.php' - '**/*.php'
...@@ -253,8 +242,7 @@ pmd-apex-sast: ...@@ -253,8 +242,7 @@ pmd-apex-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /pmd-apex/ - if: $SAST_EXCLUDED_ANALYZERS =~ /pmd-apex/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /pmd-apex/
exists: exists:
- '**/*.cls' - '**/*.cls'
...@@ -273,8 +261,7 @@ security-code-scan-sast: ...@@ -273,8 +261,7 @@ security-code-scan-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /security-code-scan/ - if: $SAST_EXCLUDED_ANALYZERS =~ /security-code-scan/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /security-code-scan/
exists: exists:
- '**/*.csproj' - '**/*.csproj'
- '**/*.vbproj' - '**/*.vbproj'
...@@ -294,8 +281,7 @@ semgrep-sast: ...@@ -294,8 +281,7 @@ semgrep-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /semgrep/ - if: $SAST_EXCLUDED_ANALYZERS =~ /semgrep/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /semgrep/
exists: exists:
- '**/*.py' - '**/*.py'
- '**/*.js' - '**/*.js'
...@@ -318,8 +304,7 @@ sobelow-sast: ...@@ -318,8 +304,7 @@ sobelow-sast:
when: never when: never
- if: $SAST_EXCLUDED_ANALYZERS =~ /sobelow/ - if: $SAST_EXCLUDED_ANALYZERS =~ /sobelow/
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /sobelow/
exists: exists:
- 'mix.exs' - 'mix.exs'
...@@ -336,15 +321,13 @@ spotbugs-sast: ...@@ -336,15 +321,13 @@ spotbugs-sast:
rules: rules:
- if: $SAST_EXCLUDED_ANALYZERS =~ /spotbugs/ - if: $SAST_EXCLUDED_ANALYZERS =~ /spotbugs/
when: never when: never
- if: $SAST_DEFAULT_ANALYZERS =~ /mobsf/ && - if: $SAST_EXPERIMENTAL_FEATURES == 'true'
$SAST_EXPERIMENTAL_FEATURES == 'true'
exists: exists:
- '**/AndroidManifest.xml' - '**/AndroidManifest.xml'
when: never when: never
- if: $SAST_DISABLED - if: $SAST_DISABLED
when: never when: never
- if: $CI_COMMIT_BRANCH && - if: $CI_COMMIT_BRANCH
$SAST_DEFAULT_ANALYZERS =~ /spotbugs/
exists: exists:
- '**/*.groovy' - '**/*.groovy'
- '**/*.java' - '**/*.java'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment