From b03279995e2894493f188b770ec6cf24dd7f54c6 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Thu, 9 Nov 2023 12:36:35 +0000 Subject: [PATCH] Rename component to secret-detection --- .gitlab-ci.yml | 2 +- README.md | 10 ++++++++-- templates/{job.yml => secret-detection.yml} | 0 3 files changed, 9 insertions(+), 3 deletions(-) rename templates/{job.yml => secret-detection.yml} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 937516f..5cfe312 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ include: - component: gitlab.com/$CI_PROJECT_PATH/job@$CI_COMMIT_SHA + component: gitlab.com/$CI_PROJECT_PATH/secret-detection@$CI_COMMIT_SHA stages: [test, release] diff --git a/README.md b/README.md index 9541ac5..e513eb1 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,18 @@ keyword. ```yaml include: - - component: gitlab.com/gitlab-components/secret-detection/job@ + - component: gitlab.com/gitlab-components/secret-detection/secret-detection@ ``` where `` is the latest released tag or `main`. +This component will add a `secret_detection` job to the pipeline. + If you are converting the configuration to use components and want to leverage the existing variable `$SECRET_DETECTION_DISABLED` you could conditionally include the component using the variable: ```yaml include: - - component: gitlab.com/gitlab-components/secret-detection/job@main + - component: gitlab.com/gitlab-components/secret-detection/secret-detection@main rules: - if: $SECRET_DETECTION_DISABLED == "true" || $SECRET_DETECTION_DISABLED == "1" when: never @@ -50,3 +52,7 @@ You can customize secret detection by defining the following CI/CD variables: | `SECRET_DETECTION_EXCLUDED_PATHS` | Exclude vulnerabilities from output based on the paths. The paths are a comma-separated list of patterns. Patterns can be globs (see [doublestar.Match](https://pkg.go.dev/github.com/bmatcuk/doublestar/v4@v4.0.2#Match) for supported patterns), or file or folder paths (for example, `doc,spec`). Parent directories also match patterns. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/225273) in GitLab 13.3. | | `SECRET_DETECTION_HISTORIC_SCAN` | Flag to enable a historic Gitleaks scan. | | `SECRET_DETECTION_LOG_OPTIONS` | [`git log`](https://git-scm.com/docs/git-log) options used to define commit ranges. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/350660) in GitLab 15.1. | + +## Contribute + +Please read about CI/CD components and best practices at: https://docs.gitlab.com/ee/ci/components \ No newline at end of file diff --git a/templates/job.yml b/templates/secret-detection.yml similarity index 100% rename from templates/job.yml rename to templates/secret-detection.yml