From 0af19cdcc3460283c1e86fb8425d7878b75de8d3 Mon Sep 17 00:00:00 2001 From: Duncan Macleod Date: Wed, 25 Sep 2024 15:23:45 +0200 Subject: [PATCH] rename advanced_sast input to run_advanced_sast implements reviewer suggestion from @craigmsmith --- README.md | 2 +- templates/sast.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 81a1dee..ca020ac 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ This assumes `SAST_DISABLED` variable is already defined in `.gitlab-ci.yml` wit | `excluded_paths` | `"spec, test, tests, tmp"` | Comma separated list of paths to exclude | | `search_max_depth` | `4` | Defines how many directory levels the search for programming languages should span | | `run_kubesec_sast` | `"false"` | Set it to `"true"` to run `kubesec-sast` job | -| `advanced_sast` | `false` | Set it to `true` to enable [GitLab Advanced SAST](https://docs.gitlab.com/ee/user/application_security/sast/gitlab_advanced_sast.html) ] +| `run_advanced_sast` | `false` | Set it to `true` to enable [GitLab Advanced SAST](https://docs.gitlab.com/ee/user/application_security/sast/gitlab_advanced_sast.html) ] | `include_experimental` | `"false"` | Set it to `"true"` to enable [experimental analyzers](https://docs.gitlab.com/ee/user/application_security/sast/#experimental-features) | ## Contribute diff --git a/templates/sast.yml b/templates/sast.yml index 0fc6cfb..396971b 100644 --- a/templates/sast.yml +++ b/templates/sast.yml @@ -16,7 +16,7 @@ spec: default: '4' run_kubesec_sast: default: 'false' - advanced_sast: + run_advanced_sast: default: false type: boolean include_experimental: @@ -58,7 +58,7 @@ gitlab-advanced-sast: rules: - if: '"$[[ inputs.excluded_analyzers ]]" =~ /semgrep/' when: never - - if: '"$[[ inputs.advanced_sast ]]" != "true"' + - if: '"$[[ inputs.run_advanced_sast ]]" != "true"' when: never - if: $CI_COMMIT_BRANCH && $GITLAB_FEATURES =~ /\bsast_advanced\b/ @@ -134,7 +134,7 @@ semgrep-sast: - if: '$CI_COMMIT_BRANCH && $GITLAB_FEATURES =~ /\bsast_advanced\b/ && "$[[ inputs.excluded_analyzers ]]" !~ /gitlab-advanced-sast/ && - "$[[ inputs.advanced_sast ]]" == "true"' + "$[[ inputs.run_advanced_sast ]]" == "true"' variables: SAST_EXCLUDED_PATHS: "$DEFAULT_SAST_EXCLUDED_PATHS, **/*.py, **/*.go, **/*.java, **/*.js, **/*.jsx, **/*.ts, **/*.tsx, **/*.cjs, **/*.mjs, **/*.cs" exists: @@ -157,7 +157,7 @@ semgrep-sast: - if: '$CI_COMMIT_BRANCH && $GITLAB_FEATURES =~ /\bsast_advanced\b/ && "$[[ inputs.excluded_analyzers ]]" !~ /gitlab-advanced-sast/ && - "$[[ inputs.advanced_sast ]]" == "true"' + "$[[ inputs.run_advanced_sast ]]" == "true"' when: never - if: $CI_COMMIT_BRANCH exists: