Security tool · secrets
gitleaks
Fast secret detection across git history and files with a strong default ruleset. Ideal for scanning cloned target repos and exposed .git folders.
Overview
Where gitleaks fits
Fast secret detection across git history and files with a strong default ruleset. Ideal for scanning cloned target repos and exposed .git folders.
Detection-first use
Start with the least intrusive template that can distinguish your hypothesis from a normal response. Preserve raw output and a negative control.
Install
Installation references
Install with brewAuthorization required
brew install gitleaks- Positive signal
- Tool-specific output that supports the stated hypothesis.
- Negative control
- No result, or identical behavior against a known-safe control.
- Intrusiveness
- Review flags and target scope before execution.
Install with goAuthorization required
go install github.com/gitleaks/gitleaks/v8@latest- Positive signal
- Tool-specific output that supports the stated hypothesis.
- Negative control
- No result, or identical behavior against a known-safe control.
- Intrusiveness
- Review flags and target scope before execution.
Test safely
Command templates
Scan a repo dirAuthorization required
Populate placeholders only with assets that are explicitly in scope.
gitleaks detect --source {path} -v- Positive signal
- Tool-specific output that supports the stated hypothesis.
- Negative control
- No result, or identical behavior against a known-safe control.
- Intrusiveness
- Review flags and target scope before execution.
Related
Continue the workflow
Sources
Attribution and verification
Version history: normalized permanent page created 2026-08-20. Upstream activity and popularity are separate signals and do not establish tool safety.