Add pre-commit hook gitleaks to detect and prevent hardcoded secrets

https://github.com/gitleaks/gitleaks

Adding another check/test to our pre-commit framework.

gitleaks is a popular tool that helps with security.

Removes the gitleaks check from the Super-Linter.

So now we can run gitleaks with pre-commit on `git commit`
This commit is contained in:
John Bampton
2024-10-16 04:18:30 +10:00
parent bbce194609
commit 42d3eb4b60
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -25,7 +25,6 @@ jobs:
# VALIDATE_BASH_EXEC: true
VALIDATE_DOCKERFILE_HADOLINT: true
# VALIDATE_EDITORCONFIG: true
VALIDATE_GITLEAKS: true
# VALIDATE_SHELL_SHFMT: true
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+4
View File
@@ -10,6 +10,10 @@ repos:
hooks:
- id: identity
- id: check-hooks-apply
- repo: https://github.com/gitleaks/gitleaks
rev: v8.20.1
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks: