scan_for_secrets
Scan code, text, or diffs for leaked secrets before sharing. Detects API keys, tokens, and credentials, returning a verdict with masked findings—all processed locally.
Instructions
Scan a blob of code, text, or a unified diff for LEAKED SECRETS before you commit, push, open a PR, or paste it somewhere. Detects provider API keys (AWS, GitHub, OpenAI, Anthropic, Stripe, Google, Slack, Twilio, SendGrid, npm, Telegram, Discord, Shopify, Cloudflare and more), generic tokens, private keys (RSA/EC/DSA/OpenSSH/PGP), JWTs, database connection strings with passwords, basic-auth URLs, and high-entropy strings that look like credentials. Returns a CLEAN / REVIEW / LEAK verdict with each finding's secret type, provider, severity, line:column, a MASKED excerpt (never the full secret), and a remediation note. Use this on every diff/file you are about to share. The scan is fully local — the secret is never sent anywhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The code/text/diff to scan for secrets. | |
| deep | No | When true, adds an offline structural validity hint (valid_format / invalid_format) for formats whose shape can be checked without any network call. No secret is ever transmitted. |