leaktap
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in install.sh
- spawnSync — Synchronous process spawning in npm/leaktap/bin/leaktap.js
- os.homedir — User home directory access in npm/leaktap/bin/leaktap.js
- process.env — Environment variable access in npm/leaktap/bin/leaktap.js
- fs module — File system access in npm/leaktap/bin/leaktap.js
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
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.
leaktap
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.

Empirical Security Audits
- Where 10 Popular AI Coding Tools Store Your Pasted Secrets on Disk: 0 of 10 redact pasted secrets before writing to disk (Codex still carries a literal
// 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. - Top 20 MCP Server Startup Audit: 5 of 20 opened outbound HTTPS calls on startup before any tool ran, 7 of 20 ship telemetry on by default (2 with no mention in their root README), 2 pass API keys in CLI flags visible in
ps aux, and 0 of 470 live tools had prompt injections.
Supported Tools & Modes
| 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 |
How leaktap Compares
| 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 |
Other Install Options
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.
Usage
Scan local logs, SQLite databases, MCP configs, and plugins
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.
Wrap live CLI and MCP sessions
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:
- Strips unrelated shell secrets (
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. - Routes supported
*_BASE_URLenv vars through a local loopback proxy so prompts, headers, and MCP tool results are checked in memory before forwarding upstream over HTTPS. - Inspects non-TTY MCP
tools/listandtools/calltraffic for poisoned schemas or rug-pulls, logsHTTP CONNECTdestination hostnames without custom root certificates, and writes live events to~/.leaktap/live.jsonl(0600).
To wrap a single MCP server inside .mcp.json:
leaktap tap --scrub-env --scrub-ssh-agent --quiet --log ~/.leaktap/mcp.jsonl -- npx @org/[email protected]
Scrub old logs and SQLite databases
Dry run by default. On a folder, clean only edits AI session logs and skips source code and backups unless you pass --include-code or point directly at a file.
With --apply, it scrubs text logs, prompt history in ~/.claude.json (leaving login accounts and mcpServers untouched), and SQLite/-wal databases after checking for active locks so open IDEs are not corrupted.
# Preview changes without modifying files
leaktap clean
# Scrub leaked secrets in place
leaktap clean --apply
# Clean a specific file, or include repo source files
leaktap clean ./leaked.env --apply
leaktap clean ./my-repo --include-code --apply
# Save a 0600 <file>.leaktap.bak copy before editing
leaktap clean --apply --backup
Terminal UI
leaktap ui
Opens a 4-tab view (Transcript Leaks, MCP / Plugin Risks, Live Wiretap, and Context & PII). Press / to filter, c then y to scrub just the selected secret across local logs and SQLite files, or q / Ctrl+C to exit.
Policy files and allowlists (.leaktap.toml)
leaktap loads ~/.config/leaktap/config.toml automatically. In CI, pass --config path/to/policy.toml or --policy-git-ref origin/main so a PR branch cannot weaken its own policy.
For test keys in source or config files, add # leaktap:ignore on the same line (or // leaktap:ignore[rule-id], /* leaktap:ignore */, <!-- leaktap:ignore -->, or # leaktap:ignore-next-line). Inline ignores are disabled under --policy-git-ref and --no-inline-ignore, never apply to chat logs or SQLite stores, and never silence MCP or hook alerts.
.leaktap.toml allowlist and custom rule
# Optional secret salt for `[fp:...]` IDs and SARIF fingerprints
# (prefer setting LEAKTAP_FINGERPRINT_SALT in CI secrets rather than committing it):
# fingerprint_salt = "org-random-secret-salt"
[allowlist]
paths = ["tests/fixtures/**"]
rules = ["internal-hostname"]
stopwords = ["acme-sandbox-dummy"]
# Copy any 16-char `[fp:...]` ID from terminal, TUI, JSON, or SARIF output:
fingerprints = ["9f86d081884c7d65"]
[allowlist.rule_paths]
# Allow a specific rule on specific files without hiding leaked keys in those files:
mcp-unpinned-package = ["docs/examples/**"]
[[rules]]
id = "acme-prod-token"
name = "Acme Internal Prod Token"
description = "Internal Acme production service token (acme_live_...)."
severity = "critical"
category = "secret"
anchors = ["acme_live_"]
pattern = 'acme_live_[A-Za-z0-9]{24,64}'
min_entropy = 3.2
List detection rules
leaktap rules
leaktap rules --format json
Limitations
leaktapruns in user space withoutsudo, custom root certificates, or eBPF hooks so it works out of the box on macOS and Linux. Third-party HTTPS traffic from child tools is logged byHTTP CONNECThostname or OS socket polling (15mson Linux,500mson macOS), without decrypting TLS payloads.- A hostile binary that ignores
*_BASE_URLandHTTPS_PROXY, uses gRPC or QUIC, finishes a request faster than the poll interval, or sends raw UDP/DNS can bypass user-space checks. Run untrusted code inbubblewrap,landlock,sandbox-exec, or a VM/container. - PII checks only cover developer emails and internal hostnames, not SSNs, payment cards, or medical records.
leaktap clean --applyonly removes secrets from local disk. Rotate any key that was already sent to an API or pushed to git.- Repo
.leaktap.tomland.leaktapignorefiles are ignored by default so a cloned repo cannot hide its own findings. Pass--trust-project-configor--policy-git-refto load them. - SARIF output omits unsalted hashes on email and hostname findings unless
LEAKTAP_FINGERPRINT_SALTorfingerprint_saltis set.
Privacy
leaktap scanandleaktap cleanmake zero network requests by default. Live checks only run when--verifyor--inspect-mcpis passed.- Zero telemetry, analytics, or accounts.
- Matched secrets are masked (
sk_live_9f...4c21) in terminal, UI, JSON, SARIF, and~/.leaktap/live.jsonloutput.
License
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi