scan_directory
Recursively scans a directory tree for exposed secrets, honoring Git ignore rules and skipping binaries, caches, lockfiles, and oversized files to detect leaks before committing.
Instructions
Recursively scan a directory tree for exposed secrets.
Inside a git repository the file list comes from git (tracked files plus untracked files no .gitignore excludes), so every ignore rule is honoured. Always skips .git, node_modules, virtualenvs, caches, dist, build, minified bundles, lockfiles, binaries, files over 5 MB and the paths the project's .secret-sentinel.toml excludes.
Args: path: Absolute path to the directory to scan. max_files: Stop after scanning this many files (default 500). max_findings: List at most this many findings, most severe first (default 200, 0 = no limit).
Returns: The standard redacted findings report; finding paths are relative to the scanned root, using forward slashes.
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": {
"path": "<path>"
},
"name": "scan_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_files | No | ||
| max_findings | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clean | Yes | ||
| summary | Yes | ||
| findings | Yes | ||
| baselined | No | ||
| top_files | No | ||
| truncated | No | ||
| suppressed | No | ||
| files_scanned | Yes | ||
| total_findings | No | ||
| counts_by_pattern | No | ||
| counts_by_severity | No |