Repository navigation
Conversation
…roducer Gates an MCP tool call on session taint before dispatch, following the Context Taint Attestation rules in draft-durga-wimse-ctx-isolation-00. Taint is sticky and a caller claim cannot lower it. Tool mutability comes from the pinned policy declaration, never from runtime annotations; unknown tools are STATE_MUTATING. A STATE_MUTATING call in an UNTRUSTED_INGESTED session is refused with CTA_TAINTED_CONTROL_PLANE before tool entry unless a policy-engine Ed25519 StepUpReceipt bound to (session_id, request_id, tool_name, args_digest) verifies. On allow, a detached cta-trace-bridge-v1 envelope is signed and verified before dispatch. After dispatch the observation must name the same call. The Level 0 Trust Record is built with agentrust_trace_adapters.build_record, signed with agentrust_trace.sign_record, and self-verified by cta_trace_verify, which imports only agentrust_trace, rfc8785, cryptography, and the standard library. Parsing is strict: duplicate keys, non-finite numbers, boolean timestamps, private JWK members, and non-canonical base64url are refused. Tests: 338 passed, 100% line and branch coverage of both modules. trace-tests verify --level 0 passes on the emitted record. Adds a conformance workflow with a hash-locked fixed job, the generated Marketplace catalog entry, and the README index row. tier: community. Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
requested review from
a team,
carloshvp and
imran-siddique
as code owners
November 20, 2026 07:27
Contributor
|
🔴 Contributor Check: HIGH
Automated check by AgenTrust Contributor Check. |
Contributor
Author
|
Closing to keep the draft-durga-wimse-ctx-isolation reference adapter in its standalone corpus repository while the IETF draft is still an individual submission. |
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 adds
integrations/wimse-cta-mcp-guard/: a TRACE Level 0 record producer that gates an MCP tool call on session taint before dispatch, following the Context Taint Attestation (CTA) rules in draft-durga-wimse-ctx-isolation-00. Modeled onpic-standard-mcp-guard. Both cited drafts are individual Internet-Drafts with no formal IETF standing, and the README says so.TRUSTED_ONLYtoUNTRUSTED_INGESTED); a caller-suppliedTRUSTED_ONLYclaim cannot lower it.readOnlyHint. Unknown tools areSTATE_MUTATING.STATE_MUTATINGcall in anUNTRUSTED_INGESTEDsession is refused withCTA_TAINTED_CONTROL_PLANEbefore tool entry unless an Ed25519StepUpReceipt(kid=sha256:+ SHA-256 of the raw public key) bound to(session_id, request_id, tool_name, args_digest)verifies.cta-trace-bridge-v1envelope is signed and verified before dispatch (bridge_signed -> bridge_verified -> tool_entered). The post-dispatch observation must name the same call. The record is built withagentrust_trace_adapters.build_record, signed withagentrust_trace.sign_record, and self-verified bycta_trace_verify.Also in this PR: the conformance workflow (
floatingand hash-lockedfixedjobs, same shape aspic-standard-mcp-guard),requirements/wimse-cta-mcp-guard-fixed.{in,txt}, and the regenerated README index row andmarketplace/catalog.json.tier: community.Verified tier request
Requesting review and the Verified tier reproduction check (CONTRIBUTING.md, "Review process"). Exact reproduction, from the repository root of a fresh clone with Python 3.11:
Expected: both
pip checkruns clean;338 passedandRequired test coverage of 100% reached;emit_record.pyprints ablocked:line (code=CTA_TAINTED_CONTROL_PLANE ... tool_entered=False tool_calls=0 marker_intact=True), anallowed:line endingbridge_signed > bridge_verified > tool_entered > tool_returned > observation_verified > record_signed > record_verified, andwrote trust-record.json (status=record-emitted, taint=UNTRUSTED_INGESTED, basis=step-up-receipt);trace-testsreportsResult: PASS (15 checks, 4 skipped). The lock pinsagentrust-trace0.11.0,agentrust-trace-adapters0.2.0,agentrust-trace-tests0.6.2.What I ran
Windows, Python 3.11.9.
pip checkbefore and after the editable installpytest integrations/wimse-cta-mcp-guard/tests -q --cov=cta_trace_guard --cov=cta_trace_verify --cov-branch --cov-fail-under=100(in that venv)python integrations/wimse-cta-mcp-guard/examples/emit_record.py --out trust-record.jsontrace-tests verify --record trust-record.json --level 0ruff check integrations/wimse-cta-mcp-guardand the CI form with--target-version py39 --select E4,E7,E9,Fscripts/validate_integrations.pyscripts/validate_compatibility.pyscripts/generate_marketplace_catalog.py --check,scripts/generate_integration_index.py --checktests/test_validate_integrations.py,test_composite_action_paths.py,test_workflow_oidc_permissions.py,test_integration_schema.py,test_validate_compatibility.py,test_test_evidence.py,test_generate_marketplace_catalog.py,test_generate_agt_marketplace_catalog.pyI also broke seven invariants one at a time in a scratch copy (gate bypass, taint downgrade by claim, receipt replay, receipt argument binding, receipt-hash presence rule, boolean timestamps, unknown-tool default) and the suite failed each time.
Not run locally: Python 3.12 and 3.13 (the new workflow covers them), the GitHub Actions workflows themselves, actionlint, and the lychee link check. The lock was compiled with the command in its header through a package mirror that also emitted md5 hashes; I removed those, and the sha256 sets match
pic-standard-mcp-guard-fixed.txtfor every package version the two locks share.What it does not claim
The README section "What it does NOT claim" is the full list. The main points:
runtime.platformissoftware-onlyand this is Level 0 with deterministic TEST keys, no hardware attestation; the envelope is this integration's own detached JSON profile, not the draft's COSE_Sign1 or header wire format, andagentrust_trace.intent_bridge.verify_bridgerefuses it; draft rule 3 (CONTEXT_MERKLE_BINDING), theMIXED_TAINTandQUARANTINEDlevels, and a context-reset boundary are not implemented; taint is reported to the guard, not observed by it; the receipt proves a signature by the pinned key, not who approved; state is process-local.The draft names the refusal
ERR_TAINTED_CONTROL_PLANE; this adapter's code isCTA_TAINTED_CONTROL_PLANE, and the README says so.