
Secret Scanner
io.github.4hmetuyarPublished by GitHub account 4hmetuyarv0.2.10Updated Oct 24, 2026
Scans files for leaked secrets and API keys
Overview
Local MCP server that scans text, files, directories, git history and coding-agent transcripts for leaked API keys, tokens and passwords.
- What you can do
- Scan arbitrary text, a single file, or a whole directory tree for secrets
- Scan git repositories: staged changes or every line added across commit history
- Scan coding-agent transcripts on the machine (Claude Code, Codex, Gemini CLI, Continue)
- List the active secret patterns (76 provider rules plus high-entropy detection)
- Report matches partially redacted, with allowlists and baseline files to suppress known findings
- When to use it
- Useful when you want to ask an assistant whether a project, .env file, pasted snippet or agent session is leaking credentials, or when adopting secret scanning in a repo that already has known findings via a baseline.
- Requirements
- Runs as a local process via npx or a global npm install of @guardbee/mcp-secret-scanner; Node.js is needed. No accounts, API keys or headers are declared. Optional GUARDBEE_TELEMETRY environment variable controls telemetry.
Installation
In SourceWeft
- Open Secret Scanner in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@guardbee/mcp-secret-scanner
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
[npm version] [npm downloads] [License: MIT]
An MCP server that scans your source files, directories, and environment configs for exposed API keys, passwords, tokens, and other secrets. Ask Claude directly whether your project is leaking secrets.
Telemetry is off by default. With
GUARDBEE_TELEMETRY=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare replaced with a placeholder. See@guardbee/mcp-telemetry.
Features
- 76 Secret Patterns — AWS, Azure, GCP, GitHub, GitLab, Stripe, OpenAI, Anthropic, OpenRouter, Groq, Hugging Face, Slack, Twilio, SendGrid, DigitalOcean, Cloudflare, Supabase, Vault, PyPI, Shopify, Linear, Notion, Atlassian and more — plus the Turkish providers iyzico, PayTR, Netgsm and İleti Merkezi, matched on their variable names since their keys have no prefix. The rules live in
@guardbee/guard-core, so@guardbee/mcp-security-proxymasks the same formats in tool results at runtime - File & Directory Scanning — a single file or an entire project tree
- Git History & Staged Scanning —
--historyscans every line any commit added, so a key deleted from the files but still in the repository is found, reported once at the commit that added it (with author and date);--stagedscans only what you are about to commit - Baseline —
--write-baselinerecords today's findings as hashes (never the secrets, safe to commit);--baselinethen reports only new ones, so an existing repo can adopt the scanner in CI without fixing everything first. SARIF results carry a stablepartialFingerprintsvalue - High-Entropy Values — a random-looking value assigned to a secret-like name (
WEBHOOK_SIGNING_SECRET=…in.env,client_secret:in YAML,"internalApiKey"in JSON) is reported even when no provider rule knows its format. Randomness is measured as Shannon entropy (hex values need 32+ characters; values without digits need more bits, so a camel-case passphrase does not count);public/publishable,*_hash,*_idand*_urlnames, placeholders and${VAR}references are left alone, and a value a provider rule already reported is not reported twice. Medium severity, low in test files;--no-entropy(orentropy: falsein the MCP tools) turns it off - Agent Transcripts —
scan --agent-history(MCP:scan_agent_history) scans what coding agents keep on your machine: Claude Code (~/.claude/projects,~/.claude.json), Codex (~/.codex), Gemini CLI (~/.gemini/tmp) and Continue (~/.continue/sessions). A key pasted into a chat or printed by a command the agent ran stays there — and was already sent to the model provider, so rotate it. Each secret is reported once per agent with how often it appears; the entropy check is off here unless--entropy, since transcripts are full of code the agent read - Large Line Files —
.jsonl,.ndjson,.ipynband.logfiles over 1 MB (transcripts, notebooks with outputs, logs) are read line by line instead of being skipped - Live Verification (CLI only) —
--verifyasks each provider whether a found key still works, through a read-only identity endpoint (GitHub/user, OpenAI/models, Slackauth.test, …): GitHub, GitLab, OpenAI, Anthropic, Slack, Stripe, Hugging Face, npm, SendGrid, Groq, OpenRouter and DigitalOcean. Each key goes only to its own provider, once, and never appears in the output; findings are markedlive/invalid/unknownand live ones are listed first.--fail-on=livefails CI only for keys that still work. The MCP tools never verify, so an agent cannot send your secrets anywhere on its own - Smart Skipping — directories like
node_modules,.git,dist,build,.nextare skipped automatically - Safe Redaction — matches are shown as first 4 + stars + last 4 characters
- Allowlist Support — allowlist known test/fake values
- 71 Unit Tests — 100% passing test suite
Quick Start
Scan without an MCP client (CI or local):
Choosing among GuardBee tools: root README — Which package should I use?.
Or install and wire it as an MCP server:
Add to claude_desktop_config.json:
MCP Tools
Example Usage
You can ask Claude:
"Scan my project for secrets:
/Users/me/my-app"
"Are there any secrets in this
.envfile?"
"Is this text safe:
export API_KEY=sk-abc123..."
Detected Secret Types
Security Note
This tool partially redacts matched values in scan results (e.g. sk_live_abc1...xyz9). Full values are never logged or exported.
CLI — CI/CD Integration
In addition to MCP server mode, this can also be used directly as a CLI:
Exit codes: 0 = no secrets found · 1 = secrets found · 2 = error
GitHub Actions
GitLab CI
Pre-commit Hook
Development
License
MIT — GuardBee
Feedback
Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.
Source: packages/secret-scanner/README.md at commit 6858f19
Tools
0Version history
3- v0.2.10LatestOct 2, 2026
- v0.2.9Sep 30, 2026
- v0.2.7Sep 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts