Conversation
pburkholder
reviewed
Feb 13, 2026
pburkholder
reviewed
Feb 13, 2026
Contributor
Author
|
Gitleaks fail should now include the skip hint for false positives. |
pburkholder
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
Summary
This PR hardens and modernizes our existing global Git hook model for secret scanning.
We were already using
core.hooksPath, but this change:~/.config/git/hooks)What changed (vs previous behavior)
New hook location (XDG):
Hooks now live in
~/.config/git/hooksinstead of the previous custom path.make installmigrates and updatescore.hooksPathautomatically.Single, explicit hook wrapper:
One wrapper governs both
pre-commitandpre-pushbehavior:pre-commit: staged-only scan (fast)pre-push: scan only commits being pushed (not full history)Config safety:
Installer writes/repairs the global gitleaks config and enforces
extend defaults.Functional verification:
make verify/make auditprove secrets are blocked and clean commits pass.prek / pre-commit compatible:
Repo-local hooks still run after gitleaks, so teams can layer linters/formatters.
Safer lifecycle:
Install saves any previous
core.hooksPath; uninstall restores it.How to switch
That will:
~/.config/git/hookscore.hooksPathIf something looks off:
git config --global --get core.hooksPath ls -la ~/.config/git/hooks make verifySecurity considerations
.gitleaks.repo.toml) are supported but should be reviewed carefully.SKIP=gitleaksremains as a deliberate break-glass option.core.hooksPathlocally can bypass global hooks;check_repos.shdetects this.