ci: add local pre-commit gitleaks hook #3

Merged
ilia merged 4 commits from ci/bootstrap-pre-commit-gitleaks-hook into main 2026-07-13 14:44:45 -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 2 commits 2026-07-12 16:23:11 -05:00
ci: add local pre-commit gitleaks hook
All checks were successful
CI / skip-ci-check (pull_request) Successful in 9s
CI / secret-scan (pull_request) Successful in 8s
CI / python-ci (pull_request) Successful in 34s
14665ddd53
ilia added 1 commit 2026-07-12 16:23:11 -05:00
ilia added 1 commit 2026-07-12 16:23:11 -05:00
ci: add local pre-commit gitleaks hook
All checks were successful
CI / skip-ci-check (pull_request) Successful in 9s
CI / secret-scan (pull_request) Successful in 8s
CI / python-ci (pull_request) Successful in 34s
14665ddd53
ilia added 1 commit 2026-07-12 18:15:38 -05:00
ci: fix gitleaks no-op ruleset (add useDefault = true)
Some checks failed
CI / skip-ci-check (pull_request) Successful in 10s
CI / secret-scan (pull_request) Failing after 9s
CI / python-ci (pull_request) Successful in 34s
347ed2241b
ilia added 1 commit 2026-07-12 18:19:14 -05:00
ci: restore repo-specific gitleaks allowlist, keep useDefault fix
All checks were successful
CI / skip-ci-check (pull_request) Successful in 9s
CI / secret-scan (pull_request) Successful in 8s
CI / python-ci (pull_request) Successful in 27s
e3b6120651
ilia merged commit 77187e3583 into main 2026-07-13 14:44:45 -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/slack-sieve#3
No description provided.