Repository navigation
fix(security): purge indexed tool descriptions when REST PATCH quarantines a server (#1561) - #1582
Merged
Merged
Conversation
Deploying mcpproxy-docs with
|
| Latest commit: |
91dfb24
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://18c4e600.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-1561-patch-quarantine-pu.mcpproxy-docs.pages.dev |
…ace with supervisor snapshot, #1561)
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 38150884168 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Impact
PATCH /api/v1/servers/{name}with{"quarantined":true}persisted the flag but left the server's tool descriptions in the search index.retrieve_toolskept returning them (15 hits in the live repro, still there 4s later), so a quarantined server's possibly poisoned descriptions stayed visible to agents. Same class as #1061, through a different writer.Cause
The purge lived only in
Runtime.QuarantineServerand in reconcile's newly-quarantined check, which compares against storage.Server.UpdateServer(the PATCH writer) saved the flag first, so reconcile never saw a transition.Decisions
Runtime.PurgeQuarantinedServerFromIndexdelegates topurgeQuarantinedServerFromIndex(global and profile indexes). No duplicated logic.UpdateServercalls it right after the flag is saved, before the change notification, whenever the caller explicitly setquarantinedto true (not on a stale copied false/true, not on unquarantine).Verification
TestUpdateServer_QuarantineTrue_PurgesIndexedTools: fails on main, passes with the fix (-race, count 5). Runtime and httpapi quarantine/purge tests pass.retrieve_toolshits on main and 0 with the fix;describe_toolreturns not_found; the dedicated endpoint behaves the same; PATCH quarantined:false re-indexes.Fixes #1561
🤖 Generated with Claude Code