scan_file
Scan a single file to detect exposed secrets, apply project allowlists and baselines, and return redacted findings; binary and files over 5 MB are skipped.
Instructions
Scan a single file for exposed secrets.
UTF-8, UTF-16 and UTF-32 text is decoded by byte-order mark. Binary files (null-byte heuristic) and files larger than 5 MB are skipped and reported as such in the summary. The project's .secret-sentinel.toml and baseline apply.
Args: path: Absolute path to the file to scan. max_findings: List at most this many findings, most severe first (default 200, 0 = no limit).
Returns: The standard redacted findings report (see scan_text). Returns an error result if the file does not exist.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| 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 |