Bind MCP filesystem capabilities to the session workspace - #163
Merged
Conversation
Compile a closed agent-interface policy, keep build/install producers off the MCP surface, and enforce contained, exact, and namespace path capabilities before tool execution. Pin the session workspace directory through subprocess startup and restrict fixed producers to their registered artifacts.\n\nFixes #161.\nRelated #162.
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.
What this fixes
The reported producer bug was one symptom of a missing transport authority boundary. All five fixed-output producers accepted arbitrary
--outputpaths, while the MCP table was generated directly from argparse and did not say which tools belonged on the agent surface, which argument bound the corpus, or which arguments were filesystem capabilities.That allowed MCP callers to reach detached/rootless modes, alternate in-repository namespaces, noncanonical receipt paths, and paths outside the governed corpus.
System-level change
agent-interface-policy.yamlrow for all 46 CLI tools and classify all 345 argparse arguments exactly once;.., static symlink aliases, multiply-linked regular files, alternate exact artifacts, and invalid namespace suffixes before spawning a tool;Boundary found during review
A separate process that already has concurrent write access to the adopter workspace can still replace an individual child path after transport inspection but before an existing tool reopens it. That is outside the current local trust-domain guarantee and cannot be closed by another pathname recheck. It requires a tool-wide stable path-object API or protected workspace execution and is tracked explicitly in #162; the documentation now states that boundary rather than claiming adversarial concurrent namespace isolation.
Verification
make checkgit diff --checkFixes #161.
Related #162.