scan_secrets
Recursively scans directories like decompiled APK output for hardcoded secrets, returning redacted, confidence-scored candidates with fingerprints for review.
Instructions
Recursively scan a directory (typically decompile_apk or decode_apk output) for likely hardcoded secrets using a multi-detector registry: AWS/Google/Azure keys, private key headers, GitHub/GitLab/Slack/Stripe/Twilio/SendGrid/Mailgun/NPM/PyPI tokens, JWTs, webhook URLs, and high-entropy key shapes. Each hit is scored into a redacted secret candidate with a detector, confidence (low/medium/high), the signals behind it (entropy, context keywords, placeholders), and a SHA-256 fingerprint - the secret value itself is never included, the context line is returned with the match replaced by [REDACTED:]. Not exhaustive, and not a replacement for a maintained secret scanner. Only reads files; skips files over 2 MB. Returns { dirPath, filesScanned, detectors, candidateCount, byConfidence, candidates: [{ detector, file, line, context, preview, length, fingerprint, confidence, signals }], truncated }. Candidates are also indexed into the knowledge graph as secret-candidate entities. For your own patterns use search_code. The full redacted result is also saved as a JSON file in the workspace and its path returned as outputPath, so it can be cited as evidence.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dirPath": "<dirPath>"
},
"name": "scan_secrets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirPath | Yes | Absolute path of the directory to scan, e.g. the outputDir from decompile_apk. Must exist. | |
| workspace | No | Workspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to "default". | |
| extensions | No | Only scan files with these extensions - lowercase, with the leading dot, e.g. [".java", ".xml"]. Omit to scan every file except known binary types (.apk, .dex, .zip, .jar, .so, images, fonts). | |
| maxResults | No | Stop after this many matches. Default and maximum 200. |