Skip to content

/api/v1/index/search bypasses quarantine filtering #877

Closed

Description

@Dumbris

Found while working on #871 (see PR #874): the REST GET /api/v1/index/search endpoint (controller.SearchTools → raw Bleve query) applies no quarantine filtering — tools of a server-quarantined upstream appear in results deterministically (verified: quarantined server's tools returned with normal scores). Quarantine filtering currently lives only in the MCP retrieve_tools handler.

This partially undermines the quarantine model's promise that a quarantined server's tool descriptions are withheld: any REST caller (Web UI search, scripts with an API key) can still read them.

Pre-existing on main (0aa3de4), not introduced by #874 — that PR only canonicalizes the returned names. TestE2E_QuarantineConfigApply's step-4 assertion passed only vacuously before (bare names never contained the server: prefix), which is how this went unnoticed.

Suggested fix: apply the same visibility gate (indexedToolVisible/quarantine check) in the REST search path, or route it through the shared filtering seam used by retrieve_tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions