Conversation
|
Thanks @bradAGI. Pairing the fixture mirror with the rules half on a same-named branch is the right way to do this, and the mirrored block in The test cases are real rather than vacuous. Both snippets import from Two things. The diff also deletes a blank line at the end of Happy to take this once those two are handled. |
|
Selected for merge. This pair keeps Closing trustabl/agent-reliability-rules#80 (PHP typed parameters) and trustabl/agent-reliability-rules#100 (PHP idempotency), which claimed the same id for different rules. Several PRs claimed the same ids independently. We are resolving each id to a single pair rather than renumbering, so the competing PRs are being closed — the rules themselves were not rejected. Merge the engine side first so a gap fails safe: a fixture for an unshipped rule is harmless, a rule with no fixture turns |
Engine half of a coordinated pair with trustabl/agent-reliability-rules#94, on a branch of the same name so the rules-sync job resolves the matching pack rather than main. Neither half should merge alone — check-rules-sync.sh fails if they do. Mirrors mcp/path_safety.yaml into testdata/rules-fixture and adds a fire and a silent case to policyRuleCases, as TestPolicyRules_AllRulesCovered requires. MCP-005 covers the Python path-safety case; the TypeScript half was missing. The silent case applies the remediation the fix text prescribes for the common shape — derive the name server-side rather than accepting a path over the protocol — instead of merely removing the write.
7886943 to
2886fcd
Compare
What the pair adds
MCP-005 covers the Python path-safety case; the TypeScript half was missing. MCP-029 mirrors CSDK-012 including its coarse-signal caveat, stated in the explanation: it flags any filesystem write, not only unnormalized paths, because TS path-normalization analysis isn't wired yet. Confidence 0.5 to match.
Deployment is what sharpens this for MCP. A stdio server is launched as a subprocess by whatever client the user is running, so it inherits that user's own filesystem permissions — a write escaping its intended directory reaches their home directory, dotfiles, and SSH keys. And the server can't see the injection: it receives a well-formed
tools/callfor a path it has no way to distinguish from a legitimate one, so containment has to be structural.What this PR does
mcp/path_safety.yamlintotestdata/rules-fixture/.policyRuleCases, asTestPolicyRules_AllRulesCoveredrequires.The silent case applies the remediation the
fixtext prescribes for the common shape — derive the filename server-side rather than accepting a path over the protocol — instead of merely deleting the write.Verification