Skip to content

security: REST PATCH quarantined=true does not purge the server's indexed tool descriptions #1561

Closed

Description

@Dumbris

Problem

PATCH /api/v1/servers/{id} with {"quarantined":true} persists the flag but does not purge the server's indexed tool descriptions. Server.UpdateServer (internal/server/server.go:2030-2150) applies updates.Quarantined when explicitly set and saves (:2122); the purge lives only in Runtime.QuarantineServer (lifecycle.go:2175, purgeQuarantinedServerFromIndex) and in reconcile's newlyQuarantined check (lifecycle.go:~1527), which compares against storage. Because storage already says quarantined after the PATCH, reconcile never sees the transition, so descriptions stay searchable via retrieve_tools/global and profile search although calls are blocked. This is the #1061 class (TPA isolation) through a different writer.

Failure scenario

Index a connected server, PATCH quarantined=true, retrieve_tools still returns its tool descriptions, also after reconciliation.

Suggested direction

Run the same purge (global + profile indexes) from the update commit when the quarantine flag flips to true; add a test asserting search results are empty immediately and after reconcile.

Where Sol found it

ux01-r10-C.txt #2.


Found by OpenCode Sol 6.1 cross-model review of the (now split) oversized PRs #1553 (UX-01) and #1555 (UX-02); verified still present on origin/main (704795c) by reading the cited sites. Pre-existing, deliberately out of scope of the minimal core PRs. Review transcripts: docs/qa/0.70.0-ux-2026-10-10/remediation/reviews/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/searchkind/bugkind/securitypriority/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions