Commit d90b2790 authored by Jonathan's avatar Jonathan Committed by Thibaud-Vdb
Browse files

Update gitleaks docker version to v8.6.0

parent 365ae7f5
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
## Objective

[Gitleaks](https://github.com/zricethezav/gitleaks/wiki/Scanning){:target="_blank"} is a tool
made to detect hardcoded secrets like passwords, api keys and tokens in git
repository. As it written in go, it is much faster than most of the
[Gitleaks](https://github.com/zricethezav/gitleaks/wiki/Scanning){:target="_blank"} is a tool made to detect hardcoded
secrets like passwords, api keys and tokens in git repository. As it written in go, it is much faster than most of the
[alternatives](https://github.com/zricethezav/gitleaks/wiki/Comparison-with-other-tools){:target="_blank"}.

## How to use it


1. Copy the job URL located in the `Install` part of the right panel and add it inside the `include` list of your `.gitlab-ci.yml` file (see the [quick setup](/use-the-hub/#quick-setup)). You can specify [a fixed version](#changelog) instead of `latest`.
1. Copy the job URL located in the `Install` part of the right panel and add it inside the `include` list of
   your `.gitlab-ci.yml` file (see the [quick setup](/use-the-hub/#quick-setup)). You can
   specify [a fixed version](/versioning/) instead of `latest`.
2. Well done, your job is ready to work ! 😀

## Job details

* Job name: `gitleaks`
* Docker image:
[`zricethezav/gitleaks:v6.1.2`](https://hub.docker.com/r/_/zricethezav/gitleaks){:target="_blank"}
[`zricethezav/gitleaks:v8.6.0`](https://hub.docker.com/r/zricethezav/gitleaks)
* Default stage: `static_tests`
* When: `always`

## Allowing Failure

If you want for this job not to fail upon discovering a secret in the commits
of the repository, you can do that by adding this to your `.gitlab-ci.yml`
If you want for this job not to fail upon discovering a secret in the commits of the repository, you can do that by
adding this to your `.gitlab-ci.yml`

```yaml
gitleaks:
  allow_failure: true
```



### Author
This resource is an **[official job](https://docs.r2devops.io/faq-labels/)** added in [**R2Devops repository**](https://gitlab.com/r2devops/hub) by [@FulcrandG](https://gitlab.com/FulcrandG)
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -4,10 +4,10 @@ stages:
gitleaks:
  stage: static_tests
  image:
    name: "zricethezav/gitleaks:v6.1.2"
    name: "zricethezav/gitleaks:v8.6.0"
    entrypoint: [""]
  script:
    - gitleaks -v --pretty --repo-path . --commit-from=$CI_COMMIT_SHA --commit-to=$CI_COMMIT_BEFORE_SHA --branch=$CI_COMMIT_BRANCH --report gitleaks-report.json
    - gitleaks detect -v -r gitleaks-report.json
  artifacts:
    expose_as: "gitleaks-report"
    paths: ["gitleaks-report.json"]
+2 −2
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@ icon: 🔐
maintainer: FulcrandG
license: MIT
images:
  "zricethezav/gitleaks": "v6.1.2"
  "zricethezav/gitleaks": "v8.6.0"
tools:
  "gitleaks": "6.1.2"
  "gitleaks": "8.6.0"

labels:
  - GitLab
+1 −0
Original line number Diff line number Diff line
* Change Docker image version of Gitleaks 
 No newline at end of file