feat: add gitleaks

This commit is contained in:
Simon Cornet 2025-06-06 17:19:35 +02:00
commit aa88e1111f
2 changed files with 20 additions and 0 deletions

View file

@ -4,6 +4,7 @@
stages: stages:
# deployment # deployment
- "gitleaks"
- "linting" - "linting"
- "deployment" - "deployment"
@ -12,5 +13,6 @@ stages:
include: include:
# deployment # deployment
- local: ".gitlab/gitleaks.yaml"
- local: ".gitlab/linting.yaml" - local: ".gitlab/linting.yaml"
- local: ".gitlab/deployment.yaml" - local: ".gitlab/deployment.yaml"

18
.gitlab/gitleaks.yaml Normal file
View file

@ -0,0 +1,18 @@
---
# gitleaks
gitleaks:
stage: "gitleaks"
image:
name: "ghcr.io/gitleaks/gitleaks:latest"
variables:
GIT_DEPTH: 1
rules:
# run only on push to default branch
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- when: "never"
# start linting
script:
- "gitleaks detect --source . --verbose --redact --max-decode-depth 1"