Betterleaks
$ betterleaks Official Low RiskBetterleaks is an MIT-licensed successor to Gitleaks maintained by Aikido Security that adds CEL-based live credential validation (--validate). Local git, fs, and stdin scans run completely offline unless -v/--validate or -a/--analyze is explicitly enabled, and emit JSON or SARIF reports via -f.
brew install betterleaks Scanning local Git history and files with betterleaks keeps potential secrets local and streams JSON/SARIF directly without transferring code to an MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-interactive git, fs, and stdin subcommands with -f json|sarif, -o - stdout support, and --no-banner.
- Supports
-f json,-f sarif,-o -, and--no-banner
Runs locally offline with zero provider requests unless -v/--validate or -a/--analyze is explicitly requested; read-only scan unless -o writes a report file.
- Offline-by-default v2 validation behavior
Single static Go binary available via brew install betterleaks and GitHub Releases for macOS, Linux, and Windows.
- Homebrew formula and multi-OS release binaries
Drop-in .gitleaks.toml compatibility plus CEL-driven validation and identity analysis when enabled.
- High-speed regex/entropy scanning with optional CEL verification
Actively developed open-source successor to Gitleaks backed by Aikido Security.
- Maintained under github.com/betterleaks/betterleaks
Clear README covering subcommands, -f formats, and validation/analysis flags.
- Official docs in repository README
Security, Auth & Guardrails
Offline by default; github/gitlab remote scans or custom configs read provider tokens from env vars or .betterleaks.toml.
100% free and open-source (MIT).
# Betterleaks Agent Rules - Keep scans offline by default; pass `--validate` (`-v`) only when live credential checks against external providers are explicitly authorized. - Always pass `--no-banner -f json` for machine parsing and avoid logging raw secret matches.
Agent-Ready Command Recipes
Safe Read-Only Queries
betterleaks fs . -f json -o - --no-banner
Scans files without Git history, skips live validation by default, and writes JSON findings directly to stdout (-o -).
betterleaks git . -f sarif -o betterleaks.sarif --no-banner
Audits commit history and emits a SARIF v2.1 report to betterleaks.sarif.
Strengths for Agents
- + Offline-by-default scanning avoids accidental outbound provider calls unless
--validateis passed. - + Supports
-f jsonand-f sarifwith-o -stdout piping and--no-banner.
Caveats & Pitfalls
- ! Non-zero exit code on findings requires handling in CI/agent scripts.
- ! JSON findings may include unredacted secret matches unless downstream output is filtered.