repo_scan
Scan repositories with Semgrep and OSV-Scanner, then triage findings through two-stage GMI models to produce cost-aware JSON verdicts and stored finding IDs.
Instructions
Scan a repo with semgrep and osv-scanner, then two-stage triage.
Returns a JSON report: per-finding verdicts with stage and cost, totals, skipped findings with reasons, the OSV section, and the estimate versus actual cost. A dry run runs the scanners and estimates the cost with no GMI calls. Files over max_file_kb are skipped unless the caller raises the cap. Every triaged finding is stored in the findings store (per-user ~/.gmi-security-mcp/findings.db by default) and the report carries scan_id, with one finding_id per finding. The custom rules pack runs in addition to the default semgrep config, and its findings carry source custom-rule. A clean repo_scan does NOT mean flawless. Writing the report to write_report needs --allow-apply on the server command line; without it the scan still runs but the write is refused.
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>",
"stage1_model": "<stage1_model>",
"stage2_model": "<stage2_model>"
},
"name": "repo_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db_path | No | ||
| dry_run | No | ||
| max_files | No | ||
| repo_path | Yes | ||
| rules_dir | No | ||
| threshold | No | ||
| max_tokens | No | ||
| max_file_kb | No | ||
| max_total_kb | No | ||
| stage1_model | Yes | ||
| stage2_model | Yes | ||
| write_report | No | ||
| include_tests | No | ||
| spend_cap_usd | No | ||
| semgrep_config | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |