Stop AI coding agents from leaking your keys, on disk and on the wire. Single Rust CLI for SQLite/JSONL scrubbing and zero-cert MCP wiretapping.
Stop AI coding agents from leaking your keys, on disk and on the wire.
Use Gitleaks or TruffleHog for git history. leaktap is a single MIT-licensed Rust binary (no daemon, no root certificates) that finds and scrubs leaked secrets in local transcripts and SQLite -wal databases (~/.claude, ~/.codex, Cursor state.vscdb, ~/.continue), and wraps live claude, codex, or MCP sessions to strip shell env secrets, block outgoing keys, pin MCP tool schemas, and log startup network calls.
# Read-only local scan on macOS, Linux, or Windows (offline after install, 0 telemetry)
npx [email protected]
# Or install with Homebrew on macOS / Linux
brew install vssinghh/tap/leaktap && leaktap
Single 6 to 8 MB Rust binary. 129 built-in rules (85 secret, 18 MCP, 14 plugin, 10 wiretap, 2 PII). Read-only by default, masks matched keys in output, and ships prebuilt binaries signed with npm Sigstore provenance and GitHub build attestations.
leaktap scanning, scrubbing, and verifying local Claude and MCP configs
// TODO: check `text` for sensitive patterns), 9 of 10 store plaintext history, and 8 of 9 plaintext tools keep transcripts or prompt history forever by default.ps aux, and 0 of 470 live tools had prompt injections.| Mode | Command | What It Covers |
|---|---|---|
| Offline audit | leaktap / leaktap scan --all | Claude Code, Codex CLI, Cursor, Gemini CLI, Windsurf, Cline, Roo Code, Zed, Continue, Aider, .mcp.json, plugins, hooks, SQLite -wal |
| Safe log scrubber | leaktap clean --apply | Scrubs leaked keys in place across transcripts, ~/.claude.json prompt history, and lock-checked SQLite/-wal files |
| Live session wiretap | leaktap --block-secrets claude | Wraps claude, codex, agy, or any MCP server (leaktap tap) to strip shell env secrets, block or redact outgoing keys, and log HTTP CONNECT hosts without root certs |
| Interactive TUI | leaktap ui | 4-tab terminal dashboard to filter findings and scrub individual secrets across logs |
| Tool | Local Transcript & SQLite -wal Scrubbing | Live Secret Blocking / Env Stripping | Live MCP Startup Wiretap & Schema Pinning | Runtime Footprint |
|---|---|---|---|---|
leaktap (MIT, Rust) | Yes (JSONL, JSON, ~/.claude.json, lock-checked SQLite/-wal VACUUM) | Yes (zero-cert loopback wrapper, --block-secrets, --scrub-env) | Yes (HTTP CONNECT hosts + SHA-256 tools/list rug-pull pins) | Single 6 to 8 MB binary, no daemon |
Gitleaks / TruffleHog | Git repos only (misses ~/.claude, state.vscdb, .mcp.json) | No | No | Single binary |
whatileaked (MIT, Node) | Scans transcripts and wipes text/JSONL, skips Cursor state.vscdb and does not wipe SQLite DBs | No (live redaction sold separately) | No | npx (Node 20+, Node 22.13+ for SQLite read) |
Medusa (AGPL, Python) | Scans and purges text/JSONL and shell history, does not purge SQLite/Cursor DBs | No (static scanner) | Static repo/MCP checks only | Python package (pip) |
Pipelock (Apache/ELv2, Go) | No (egress firewall only) | Yes (full proxy firewall, optional TLS MITM and sandbox) | Yes (bidirectional MCP proxy + signed receipts) | Proxy daemon / Docker / Helm |
npx [email protected] ships prebuilt binaries for macOS, Linux, and Windows, and brew install vssinghh/tap/leaktap covers macOS and Linux. You can also build from source or verify a release binary directly:
Cargo:
cargo install --git https://github.com/vssinghh/leaktap --tag v0.4.3 --locked
Shell installer (macOS and Linux, inspect the script first):
curl -fsSLO https://raw.githubusercontent.com/vssinghh/leaktap/v0.4.3/install.sh
less install.sh
LEAKTAP_VERSION=v0.4.3 sh install.sh
# Optional: verify GitHub Actions build attestation
gh attestation verify ~/.local/bin/leaktap --repo vssinghh/leaktap
Prebuilt binaries, .sha256 checksums, and build attestations for macOS, Linux, and Windows are on GitHub Releases.
Runs offline by default. Scans ~/.claude, ~/.codex, ~/.gemini, ~/.cursor, ~/.codeium/windsurf, ~/.continue, installed plugins and skills, shell hooks, and workspace MCP or rule files.
Catches API keys, private keys (PEM, OpenPGP, JWK, GCP service accounts, Kubernetes secrets), database URLs, and passwords, including encoded blobs (Base64, gzip+Base64, hex, UTF-16) and SQLite -wal pages.
# Default local audit (exits 0; add --ci to fail on HIGH/CRITICAL findings)
leaktap
# Scan both the current repo and global AI agent folders
leaktap scan --all --ci
# Opt-in: check whether detected keys are still active across 24 providers
leaktap scan --verify --fail-on critical
# Opt-in: inspect live MCP servers for poisoned tool descriptions and save schema hashes
leaktap --mcp-pins-file ./mcp-pins.lock scan --inspect-mcp --ci
# Refresh saved MCP tool hashes after upgrading a server
leaktap --mcp-pins-file ./mcp-pins.lock scan --inspect-mcp --update-mcp-pins
# Scan a specific repo, skill folder, or file
leaktap scan ./my-project --ci
leaktap scan ./third-party-skill --ci
# PR CI check loading policy from origin/main with SARIF output
LEAKTAP_FINGERPRINT_SALT="$SARIF_SALT" leaktap scan . --policy-git-ref origin/main --format sarif --ci > leaktap.sarif
--inspect-mcp blocks loopback, private, and cloud-metadata IPs and does not expand ${ENV} variables from untrusted repo configs.
Start claude, codex, or agy through leaktap. Any extra flags pass straight through:
# Watch outgoing prompts, strip unrelated shell secrets, and log child sockets
leaktap claude
leaktap codex
leaktap agy
# Also strip SSH_AUTH_SOCK from the CLI and its MCP servers
leaktap --scrub-ssh-agent claude
# Keep specific env vars needed by a tool or MCP server
leaktap --allow-env GH_TOKEN,GOOGLE_APPLICATION_CREDENTIALS claude
# Block outgoing API requests (HTTP 400) containing secrets or critical prompt injections
leaktap --block-secrets claude
# Redact secrets to [REDACTED_BY_LEAKTAP] in transit (blocks with HTTP 400 if unredactable)
leaktap --redact-secrets claude
When wrapping a session, leaktap:
AWS_SECRET_ACCESS_KEY, STRIPE_SECRET_KEY, DATABASE_URL, etc.) while keeping profile selectors (AWS_PROFILE, KUBECONFIG), the CLI's own API key, and anything passed to --allow-env.*_BASE_URL env vars through a local loopback proxy so prompts, headers, and MCP tool results are checked in memory before forwarding upstream over HTTPS.tools/list and tools/call traffic for poisoned schemas or rug-pulls, logs HTTP CONNECT destination hostnames without custom root certificates, and writes live events to ~/.leaktap/live.jsonl (0600).To wrap a single MCP server inside .mcp.json:

Open-source XDR and SIEM platform for threat detection, log analysis, file integrity monitoring, vulnerability assessment, and compliance management across endpoints and cloud workloads.

Open-source network IDS/IPS/NSM engine for real-time traffic inspection, intrusion detection and prevention, protocol analysis, and rule-based threat hunting.

Zeek is a powerful network analysis framework that is much different from the typical IDS you may know.