fix(configurable): require approval for MCP subprocesses #1591
All Vouch review confidence checks passed
Residual risk 0.37 = Change Risk (0.66) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 346 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.350
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #1591"
general
weight: 0.35
ktsoator
Link to Issue or Description of Change
Closes #1569.
YAML
McpToolsetconfigs can start arbitrary local commands when tools are first listed. Require an operator-provided--mcp-policyJSON file approving executable paths and complete argument lists. Empty arguments approve only commands with no arguments.Launch through the approved policy path to preserve virtual environments, and recheck its target before startup. Both agent and Workflow node caches include the policy identity so later loads cannot inherit another policy's approvals.
Behavior change
The internal YAML loader rejects stdio MCP configs without approval. The CLI logs and skips rejected agents; an invalid policy file stops startup. Direct use of
mcptoolset.Newis unchanged. Approval does not sandbox programs or revoke existing toolsets.The README documents first-match behavior for aliases, JSON field matching, and the trusted working-directory requirement.
Testing Plan
Passed locally on macOS with Go 1.26.6 against
mainat12f7cab:go build -mod=readonly workgo test -race -mod=readonly -count=1 -shuffle=on workgolangci-lint run(v2.3.1) in both modulesgo mod tidy -diffin both modules; no diffRegression tests exercise the factory, exact arguments, malformed policies, symlinks, and cache isolation. Workflow cases cover chains, routed edges, nested workflows, and another workflow sharing the child. Absent, empty, and different-argument policies are rejected after an approved load; the original policy still reuses cached nodes.
Removing factory authorization fails
TestResolveToolReferenceMCPPolicy. Reverting Workflow cache isolation, or dropping the policy from its key, lookup, or insertion, failsTestFromConfigWorkflowMCPPolicyIsolation. A fresh independent review of the full diff found no actionable issues.Local subprocess tests verify lazy startup and approved invocation paths. A manual Python 3 venv check preserved
sys.prefix; it exercised startup without an MCP handshake. No model or remote MCP calls were made. Windows verification passed all five executable/symlink cases with none skipped.Checklist
Additional context
ADK Python also denies stdio MCP configs by default. Its opt-in permits all such configs; this change requires exact command and argument approvals as requested in #1569.