Sending-side chain direction: validators should gate final wire bytes, but SDKs disagree
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend-api-design, security, testing-qa
Research direction
Read the SEP context from #20 and the feature/python-sdk direction derivation, then inspect the chain-request-order-mutate-then-validate and redaction-defuses-relaybleed conformance fixtures. Confirm the sending-side order in the SEP text, align the Python SDK derivation, and verify the executable fixtures pass with the intended outcomes.
Written by the indexing model from the issue text.
Description
Found while matrix-testing SDKs against conformance fixtures (context: #20). Filing separately because this divergence changes security behavior, not just wire shape.
The divergence. For a request on the sending side, the SEP's client trust-boundary order runs mutators before validators, so validation covers the final bytes that will actually cross the boundary. feature/python-sdk derives validate-then-mutate for the same case (matching the Go SDK's receiving-side posture).
Why the order matters, the soundness argument. If validation runs before mutation, mutator output is never validated: a buggy or compromised mutator can reintroduce content after the validator approved the message. Validate-last is the only order where the validator's verdict applies to what is actually sent.
It also has a false-positive cost in the other direction. Concrete case from the behavior fixtures: a redaction mutator that strips credentials, composed with a cross-boundary exfiltration guard. In the SEP order, the redactor defuses the payload first and the guard correctly allows the now-safe write. In the derived validate-first order, the guard sees the verbatim credential before the redactor runs and denies a write that should have been allowed. Same interceptors, same message, opposite outcomes purely from chain direction.
Both behaviors are pinned as executable fixtures in the suite posted on #20 (chain-request-order-mutate-then-validate, redaction-defuses-relaybleed). Related in spirit to the C# divergences already tracked in #15 / #17: this class of cross-SDK drift is exactly what conformance should catch.
Proposal: pin the sending-side order (mutate, then validate) explicitly in the SEP text, and align the direction derivation in feature/python-sdk. Happy to PR the SDK fix with tests if the group agrees.
- Dominant language
- C#
- Stars
- 23
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/experimental-ext-interceptors
-
Python SDK: support `phase="both"` as decorator sugarMay be free again @olaservo claimed this 69 days ago, and no pull request is open. Openenhancement
modelcontextprotocol/experimental-ext-interceptors#37 · 1 assignee ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
modelcontextprotocol/experimental-ext-interceptors#20 · 1 comment ·
-
Add HTTP example for transparent-proxy (TypeScript SDK)Possibly taken @murthy-g claimed this 2 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in modelcontextprotocol/experimental-ext-interceptors
Similar issues
-
area-TableView bug needs-triage team-Controls
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
microsoft/microsoft-ui-xaml#12351 · 1 comment ·
Maintainers usually reply within 2 days
-
AudioClient and ImageClient file path overloads send the full local path as the multipart file namePossibly taken @sebxt claimed this today. Openarea: audio area: images feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openai/openai-dotnet#1453 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elsa-workflows/elsa-foundation#3130 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100