Skip to content

fix(ci): use gitleaks git --staged in the pre-commit hook - #191

Merged
haribo merged 1 commit into
developfrom
fix/186-gitleaks-hook
Aug 9, 2026
Merged

fix(ci): use gitleaks git --staged in the pre-commit hook#191
haribo merged 1 commit into
developfrom
fix/186-gitleaks-hook

Conversation

@haribo

@haribo haribo commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

.githooks/pre-commit called gitleaks detect --staged, but recent gitleaks moved --staged off detect onto gitleaks git. With a current gitleaks the hook errored on flag parsing and blocked every commit, falsely reporting "detected potential secrets" without scanning anything. Switch to gitleaks git --staged.

Test plan

  • The fixed hook ran on its own commit (gitleaks git --staged → "no leaks found"), no --no-verify
  • Graceful skip when gitleaks is absent is unchanged

Closes #186

@haribo
haribo merged commit 664501d into develop Aug 9, 2026
7 checks passed
@haribo
haribo deleted the fix/186-gitleaks-hook branch August 9, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pre-commit gitleaks hook uses an unsupported detect --staged flag

1 participant