Root-cause analysis (diff-based)
vulnerability_root_causeExplains why a vulnerability exists by diffing vulnerable and patched source code or using a CVE advisory, then reports root cause, vulnerable pattern, and defensive fix guidance.
Instructions
Explain WHY a vulnerability exists. With sourcePath (and optional patchedPath) it locates the hinted function, line-diffs vulnerable vs patched code and classifies the fix (bounds/auth/validation/integer/null check). With only cveId it uses the stored advisory. Produces root cause, vulnerable function, vulnerable pattern, why it exists and defensive fix guidance.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "vulnerability_root_cause"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cveId | No | CVE id to pull the local advisory record. | |
| sourcePath | No | Vulnerable source file (workspace-relative). | |
| patchedPath | No | Patched source file for diffing (workspace-relative). | |
| functionHint | No | Function/identifier to focus on. |