gograph_flow
Trace potential untrusted-data flows from HTTP, JSON, or environment sources to SQL, process, filesystem, or outbound HTTP sinks during Go security reviews.
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. The MCP server refreshes source analysis before this call; run gograph build . --precise first for stronger method/interface targets. Read-only; no side effects. 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, and path steps. Configure trusted return-value sanitizers in .gograph/flow.json or with config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean. | |
| 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 | Sanitizer policy path inside the graph root (default .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 | |
| intention | No | Technical rationale, required for analytical calls selecting an active session. | |
| session_id | No | Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session. | |
| context_depth | No | Optional call-site frames kept per value (default 3, max 16). Deeper settings are more precise and need more work. |