Repository navigation
fix(mcp): find path options by type and decide each - #3687
Merged
Merged
Conversation
The audit of MCP path parameters read only the words in a name, so a Path option under another name passed with no decision. It now reads the Click type of each option (typer.models.TyperPath) and the pydantic path format of a hand-written tool, as well as the name. Eight options get a decision. ai_harness_offload.repo, ai_read.repo, docker_sandbox.workspace, sandbox_deploy.workspace, k8s_diff_helm.values, roadmap_refine.source, scan_injection.suppress and scan_sast.config are confined under the work tree. A Semgrep registry id stays as it is. The review_export_feedback tool drops its output option. The generator confines a path before the sandbox check reads the workspace. Closes #3480 Change: openspec/changes/3480-mcp-path-audit-reads-types/
The audit now finds an option that Typer opens from a path (typer.FileText, typer.FileBinaryRead) as well as a Path option. A probe with a FileText option under a name with no keyword fails the audit. Confinement of workspace now runs before the sandbox check, so two tests in test_sandbox_lifecycle.py get a work tree. The run-user case leaves the tool test, because confinement refuses a path outside the tree first. The error-path tests of the confinement now assert the error code and the exit code. The proposal gives counts that the base commit shows: 59 published options, 51 with a decision.
Owner
Author
Test resultsfail-to-pass runCommand:
An earlier run of the new tests on the base, before the code, showed 23 failures. Each fails for the stated reason: the census of the 8 options, the audit, the traversal cases, the sandbox cases and the Semgrep cases. Tests on the head
Review findingsI checked each finding of the review before I fixed it. All were right.
Scope notes
|
dan-petty
marked this pull request as ready for review
November 5, 2026 19:17
dan-petty
pushed a commit
that referenced
this pull request
Nov 5, 2026
🤖 I have created a release *beep* *boop* --- ## [0.63.1](v0.63.0...v0.63.1) (2026-11-05) ### Bug Fixes * **mcp:** find path options by type and decide each ([#3687](#3687)) ([f7320cf](f7320cf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The audit of the MCP path parameters found a path option by the words in its name, so an option that holds a path under another name passed with no decision. The audit now reads the Click type of the option (a Path or a file annotation), and the pydantic path format for a tool that no command backs.
Eight published options had no decision. Seven are now confined under the work tree: the repo options of ai_harness_offload and ai_read, the workspace options of docker_sandbox and sandbox_deploy, k8s_diff_helm values, roadmap_refine source and scan_injection suppress. review_export_feedback no longer publishes output.
A sandbox workspace is confined before the sandbox check. scan_sast config keeps a Semgrep registry id and confines any other value, so a URL cannot make Semgrep reach the network.
Closes #3480
Change:
openspec/changes/archive/2026-11-05-3480-mcp-path-audit-reads-types/