gograph_flow
Trace untrusted HTTP, decoded JSON, or environment data to SQL, process, filesystem, or outbound HTTP sinks in Go code to flag security review targets before changing request parsing or execution.
Instructions
Find potential untrusted-data paths from HTTP request objects, decoded JSON values, or environment variables to SQL query text, process execution arguments, filesystem paths, or outbound HTTP targets. Run gograph build . --precise first for stronger method/interface targets. WHEN TO USE: During a security review or before changing request parsing, command execution, file access, SQL construction, or URL handling. NOT TO USE: As proof of exploitability; the analysis is path-insensitive and call/return context for the 3 most recent call sites by default (context depth up to 16; deeper returns that lose their call site are kept at low confidence), bounded by a size-derived work budget that reports incomplete runs explicitly. RETURNS: Structured findings with source, sink, severity, confidence, parameter_only (constant non-shell program), and path steps; an exhausted budget lists top_functions by work. The policy (.gograph/flow.json or config) adds return-value or argument sanitizers and custom sources and sinks by function.
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": "gograph_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| sink | No | Optional sink kind: sql_query, process_execution, filesystem, or outbound_http | |
| term | No | Optional substring filter matched against functions, files, endpoints, and path steps | |
| config | No | Policy path inside the graph root (default gograph/flow.json, else .gograph/flow.json, when present) | |
| source | No | Optional source kind: http_request, decoded_json, or environment | |
| max_work | No | Optional propagation work budget; defaults to a value derived from the number of flow facts. An exhausted budget returns completeness.complete=false with partial findings. | |
| no_tests | No | Exclude functions in *_test.go files | |
| packages | No | Limit analysis to these import paths; prefix/... includes descendants | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. | |
| context_depth | No | Optional call-site frames kept per value (default 3, max 16). Deeper settings are more precise and need more work. |