feat(security): add gitleaks secret scan to lefthook pre-commit - #38
Merged
Conversation
Scans staged files with gitleaks before commit to block secrets. Skips during merge/rebase. Documented in README.
Greptile P1: documented setup installed lefthook but not gitleaks, which the pre-commit secret-scan hook requires. Contributors following the instructions would hit a missing-binary failure on every commit.
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.
Summary
Why
Prevent accidental secret commits. Gitleaks scans staged files before commit and blocks if secrets are detected.
Verification
Greptile Summary
Adds a pre-commit secret scanner and documents installation of its required tooling. The earlier documentation concern is resolved: the setup now installs Gitleaks before hooks are installed, and an executed check confirmed the required command is documented.
Confidence Score: 5/5
No blocking failure remains.
The hook accepted harmless content, rejected a detectable fake credential, and the documentation includes the required Gitleaks installation command.
What T-Rex did
Reviews (2): Last reviewed commit: "fix(README): add gitleaks installation s..." | Re-trigger Greptile