Skip to content

feat(security): add gitleaks secret scan to lefthook pre-commit - #38

Merged
iap merged 2 commits into
masterfrom
feat/secret-scan-lefthook
Aug 29, 2026
Merged

feat(security): add gitleaks secret scan to lefthook pre-commit#38
iap merged 2 commits into
masterfrom
feat/secret-scan-lefthook

Conversation

@iap

@iap iap commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add — gitleaks-based secret scan
  • Wire it into as a command (skips merge/rebase)
  • Document the new hook in

Why

Prevent accidental secret commits. Gitleaks scans staged files before commit and blocks if secrets are detected.

Verification

  • passes
  • 7/7 ad-hoc checks passed (syntax, YAML validity, gitleaks detection confirmed with RSA private key test)

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.

T-Rex T-Rex Logs

What T-Rex did

  • The secret-scan wrapper was run with a harmless fixture in an isolated worktree, and it reported no leaks with exit code 0.
  • The same wrapper was run with a staged fake Slack token, and it exited with code 1 with gitleaks reporting slack-bot-token.
  • The README documents the installation commands mise use lefthook and mise use gitleaks, ensuring the required executable is available for the wrapper.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix(README): add gitleaks installation s..." | Re-trigger Greptile

Scans staged files with gitleaks before commit to block secrets.
Skips during merge/rebase. Documented in README.
Comment thread README.md
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.
@iap
iap merged this pull request into master Aug 29, 2026
2 checks passed
@iap
iap deleted the feat/secret-scan-lefthook branch August 29, 2026 03:22
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.

1 participant