ci: add local pre-commit gitleaks hook #1

Merged
ilia merged 4 commits from ci/bootstrap-pre-commit-gitleaks-hook into main 2026-07-13 15:04:38 -05:00
Owner

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-scanning CI job — same
.gitleaks.toml allowlist, same tool.

To activate (one-time, per clone)

bash scripts/git-hooks/install.sh

This copies scripts/git-hooks/pre-commit to .git/hooks/pre-commit. If gitleaks
isn't installed locally the hook no-ops with a warning (CI still catches it either way).

Test plan

  • Merge, then run the installer once locally
  • Confirm git commit with a fake secret in a staged file is blocked
## 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-scanning` CI job — same `.gitleaks.toml` allowlist, same tool. ## To activate (one-time, per clone) ```bash bash scripts/git-hooks/install.sh ``` This copies `scripts/git-hooks/pre-commit` to `.git/hooks/pre-commit`. If `gitleaks` isn't installed locally the hook no-ops with a warning (CI still catches it either way). ## Test plan - [ ] Merge, then run the installer once locally - [ ] Confirm `git commit` with a fake secret in a staged file is blocked
ilia added 3 commits 2026-07-12 16:21:24 -05:00
ilia added 1 commit 2026-07-12 16:21:24 -05:00
ilia added 1 commit 2026-07-13 15:01:49 -05:00
ilia merged commit 1aad2232bd into main 2026-07-13 15:04:38 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ilia/Hearth#1
No description provided.