detect_secrets
Scan code or config files for hardcoded secrets: AWS keys, GitHub tokens, OpenAI/Anthropic API keys, Stripe secrets, JWTs, Slack/Teams/Discord webhook URLs, session cookies, database connection strings, and generic passwords. Returns findings with severity.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input": "redis://cache:6379"
},
"name": "detect_secrets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Code or config content to scan (max 500KB) | |
| filename | No | Optional filename for context (e.g. ".env", "config.js") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | ||
| findings | No | ||
| risk_level | No | ||
| recommendation | No | ||
| total_findings | No |