keyhog · open source · MIT

Find the secrets leaked in your code before someone else does.

keyhog is an open-source secret scanner written in Rust. It walks your tree and your git history, matches 923 service-specific detectors, and can check with the provider whether each leaked key still works. One binary, one command, one SARIF file your CI already knows how to read.

Install

cargo
cargo install keyhog
linux / macos
curl -fsSL https://santh.dev/keyhog/install.sh | sh
windows (powershell)
iwr https://santh.dev/keyhog/install.ps1 -useb | iex
from source
git clone https://github.com/santhreal/keyhog && cd keyhog && cargo build --release

Then point it at a tree:

keyhog scan .

What a finding looks like

┌    CRITICAL ─── AWS Access Key
 Secret:       AKIA...JX7Q
 Location:     infra/terraform/main.tf:142
 Confidence:   ■■■■■■ 100%
 Verification: LIVE  (sts:GetCallerIdentity → 200, account 123…)
 Action:       Revoke immediately and rotate.
└─────────────────────────────────────────────

Every finding names the service, the file and line, a confidence score, and the action to take. Severities run from CRITICAL (a live credential on a paid production account) down to CLIENT-SAFE (a key that is public by design, like a Sentry DSN). Each tier gets its own exit code, so CI can fail on CRITICAL + HIGH without breaking on a key that is meant to ship.

Live verification: which leaks still work

Most scanners stop at the pattern match. Pass --verify and keyhog probes the provider for every detector with a known liveness endpoint, then stamps each finding LIVE, REVOKED, DEAD, or UNVERIFIED. A finding is never silently upgraded.

keyhog scan . --verify

Why it does not cry wolf

A scanner that fires on everything gets switched off. keyhog keeps false positives down with companion-required validation (an AWS access key without its 40-char secret is skipped), decode-through scanning (Kubernetes Secrets, JWT payloads, base64-wrapped envs are decoded in place, then scanned), multiline reassembly for secrets split across lines, and context-aware suppression for keys inside documentation and examples.

Built for CI

Fast by default

keyhog routes each scan to the fastest backend on the host: SIMD on the CPU, and an Aho-Corasick automaton on the GPU when a file is large enough to be worth the dispatch. The GPU path runs on Vyre, our GPU compute substrate, and produces bit-identical findings to the CPU path. On a full Linux kernel checkout, a scan finishes in a couple of seconds.

If you are comparing secret scanners

Gitleaks is fast and pattern-only. TruffleHog verifies credentials but scans on the CPU. keyhog gives you both halves: service-specific detection with live verification, plus a GPU-accelerated matching engine, per-severity exit codes, and a daemon mode that makes pre-commit scans effectively instant. Single static binary, MIT licensed, no telemetry, no network calls unless you pass --verify.

Get it

github.com/santhreal/keyhog - source, issues, and release notes. Packages on crates.io. The longer architecture writeup is on the blog: Meet keyhog.