Repository navigation
Add six MCP abuse-case scenarios with passing and failing traces - #177
Open
astrogilda wants to merge 5 commits into
Open
astrogilda wants to merge 5 commits into
astrogilda wants to merge 5 commits into
Conversation
Adds six trace-level scenarios on the MCP protocol surface, each with a passing trace fixture under examples/traces/<category>/ so tests/test_scenario_pass_fixtures.py covers them. Two fill categories the schema declares but no bundled scenario used: context_injection and unauthorized_outbound_action. The other four are MCP trust-boundary, approval-bypass and unsafe-tool-execution cases that do not overlap the three MCP scenarios already bundled. Two also exercise the mcp_prompt_get and mcp_tool_result event types that docs/trace-format.md normalizes and no scenario used.
Each of the six scenarios gets a trace that trips it, run in the security-regression job and written to regression_demo/, so the existing gate fails if any of them stops detecting its own abuse case. A scenario that cannot fail is not a regression test.
Each of the six scope notes now points at the conformance vector suite the evidence shapes are published in, so a reader checking whether a case models a real failure has the vectors to check it against.
Author
|
Hey @mertsatilmaz, the tests run on this pull request is waiting for approval. I ran its three jobs against the merge commit, and lint, tests and the security-regression job all pass. Each of the six new MCP scenarios returns fail against its failing trace, as that job requires. Would you approve the run when you have a moment? |
The conformance-vector repository moved to a new owner. The old URL only resolves through a redirect, so link the current path. Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
approval_required matches action exactly against observed tool names, and MCP calls are recorded as mcp/<server_id>/<tool>. A bare tool name therefore returns not_run even when the agent made the call. Document the rule, cross-reference it from the trace format, and pin both results with unit tests. Signed-off-by: Sankalp Gilda <23521054+astrogilda@users.noreply.github.com>
This branch has not been deployed
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.
Fixes #
Describe the changes you have made in this PR -
No linked issue. This pull request adds MCP abuse, context-injection, approval-bypass and unsafe-tool-execution cases, at least one of each.
This adds six MCP abuse cases at trace level, each with a trace that trips it: two in schema categories no bundled scenario used (context_injection, unauthorized_outbound_action), and four on the MCP surface that the bundled MCP scenarios do not cover.
Each failing trace runs in the regression_demo gate, following
examples/traces/README.md: a scenario that cannot fail is no regression test.The approval_required assertion matches its action against observed tool names. MCP calls are recorded as
mcp/<server_id>/<tool>, so a bare action name returns not_run even when an agent called it.The cases exercise the evidence vectors at probityai/agent-evidence-vectors, cited in each scope note.
Edited 2026-10-09: the approval_required docs line and its two tests are in this PR, and the vectors link points at the current owner.
Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code or documentation ?
If you used AI assistance, briefly describe:
schemas/scenario.schema.json. I checked each fails on its violating trace, and passes or returns not_run on its clean one.Checklist before requesting a review
[Unreleased]inCHANGELOG.md(or this PR does not need one — pure refactor, internal tests, or CI-only change)