scan_git_range
Scan commits in a git range—by default, those a push would send—to detect exposed secrets before pushing and return redacted findings by commit.
Instructions
Scan the commits in base..head: by default, what git push would send.
Run this before pushing. With the defaults it scans every commit on the current branch that its upstream does not have yet. If the branch has no upstream, the error says so: pass the branch you will push to as base (for example "origin/main").
Args: repo_path: Absolute path to a git repository (or any path inside one). base: Commits reachable from here are excluded (default "@{upstream}"). head: Last commit to include (default "HEAD"). max_commits: Scan at most this many of the newest commits in the range. max_findings: List at most this many findings, most severe first (default 200, 0 = no limit).
Returns: The standard redacted findings report with a "commit" field on each finding, plus "commits_scanned" and "range".
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": {
"repo_path": "<repo_path>"
},
"name": "scan_git_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | @{upstream} | |
| head | No | HEAD | |
| repo_path | Yes | ||
| max_commits | No | ||
| max_findings | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clean | Yes | ||
| range | Yes | ||
| summary | Yes | ||
| findings | Yes | ||
| baselined | No | ||
| top_files | No | ||
| truncated | No | ||
| suppressed | No | ||
| files_scanned | Yes | ||
| total_findings | No | ||
| commits_scanned | Yes | ||
| counts_by_pattern | No | ||
| counts_by_severity | No |