ci: add local pre-commit gitleaks hook #3
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "ci/bootstrap-pre-commit-gitleaks-hook"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a local pre-commit gitleaks hook so secrets are caught before they leave your
machine, not just at CI time. Mirrors the
secret-scanningCI job — same.gitleaks.tomlallowlist, same tool.To activate (one-time, per clone)
This copies
scripts/git-hooks/pre-committo.git/hooks/pre-commit. Ifgitleaksisn't installed locally the hook no-ops with a warning (CI still catches it either way).
Test plan
git commitwith a fake secret in a staged file is blocked