Merge branch 'rename-component' into 'main'

Rename component to secret-detection

See merge request gitlab-components/secret-detection!5
This commit is contained in:
Fabio Pitino 2023-11-09 12:39:24 +00:00
commit e0a58221fe
3 changed files with 9 additions and 3 deletions

View file

@ -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]

View file

@ -13,16 +13,18 @@ keyword.
```yaml
include:
- component: gitlab.com/gitlab-components/secret-detection/job@<VERSION>
- component: gitlab.com/gitlab-components/secret-detection/secret-detection@<VERSION>
```
where `<VERSION>` 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