mcp: a caller cannot detect that a provider's tool definitions changed
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- api, distributed-systems, security
Hướng nghiên cứu
Start by reading verifyGossipToolRows and verifyGossipToolRowsWithFetcher in internal/node/mcp_handlers.go, then inspect NodeCatalogReport in api/sam.proto and the required_labels flow. Use the open questions to settle the digest, session, and configuration design before changing the three implementations; done means the chosen continuity behavior is specified and the SDK parity matrix remains accurate.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The gap
A caller that reaches a provider over /sam/mcp/1.0.0 verifies who the provider is — the Biscuit is signed by a trusted control-plane key, bound to the peer, unexpired, carrying sam:role:node. Nothing verifies that the tool it is about to call is the same tool it saw last time.
The mesh deliberately takes the live value as authoritative. verifyGossipToolRows (internal/node/mcp_handlers.go:344):
treats unsolicited announcements as routing hints, not authorization evidence. Each candidate is confirmed through the existing authenticated MCP session and exact tools/list response before it is exposed.
and verifyGossipToolRowsWithFetcher keeps the fetched description, discarding what was announced. That is correct for an announcement, and it also means nothing in the mesh remembers what a tool looked like before.
The control plane does not fill that role: NodeCatalogReport (api/sam.proto:367) is "Display-only; carries no authorization weight."
An enrolled node can therefore change a tool's description or its input schema at any time, and every caller keeps treating it as the tool it originally reviewed.
Why it matters
This is a named class — "MCP rug pull". The Cloud Security Alliance describes it as "tool definitions changed server-side after security review and user approval", with the impact "persistent covert access after trust has been established; compliance audit failure". Invariant Labs published it as a security notification.
The MCP specification's security best practices (2026-07-28) names nine threats; this is not among them. A mesh that wants to address it is on its own.
Enrolled providers
SAM providers hold a control-plane credential rather than being arbitrary servers someone installed, which narrows the threat but does not remove it. Enrollment proves identity, not intent, and a compromised but still-enrolled node is the case AGENTS.md names:
Zero Trust: Assume no implicit trust between nodes, control planes, routers, or external actors.
The trust a caller places in a tool definition is currently implicit, and it is the one input to the agent's decision that nothing in the mesh attests.
Sketch
Modelled on required_labels, so it lands where callers already look:
- A canonical digest over the
tools/listresponse — tool names, descriptions, input and output schemas, deterministically ordered and serialised. - An optional
expected_tools_digeston the session, alongsiderequired_labels. - A mismatch refuses the session with a typed error, as
LabelsNotSatisfiedErrordoes. - All three implementations, to keep the SDK parity matrix accurate.
Open questions
- Opt-in or default? Tools legitimately change, and MCP has
tools/list_changed. A caller-supplied pin seems right; a mesh-wide default does not. - Where does the first digest come from? Trust on first use, or operator configuration. The second is stronger and needs a configuration path.
- Canonicalisation. JSON Schema has map ordering and number formatting; a digest that is not byte-stable produces false alarms. Getting this wrong is worse than not having it.
Limits
This detects change, not malice. A provider hostile from the first call is unaffected — it is a continuity control, not a trust decision.
Happy to implement whichever shape you settle on, or to drop it if continuity belongs elsewhere in the design.
- Ngôn ngữ chính
- Go
- Star
- 1.2k
- Fork
- 207
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 85
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/agentmesh
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
google/agentmesh#952 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: Out of Band Host Containment and Local Veto Hook for Uncooperative Agents (KillSwitch Integration)Có thể đã có người làm @oyesanyf đã nhận 15 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
google/agentmesh#879 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của google/agentmesh
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
projectcalico/calico#14766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
forward/review service/container
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
hashicorp/terraform-provider-google#30852 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
docs(scheduling): a rolling deploy can open a second launch-gate episode (old replica after new)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
SocialGouv/iterion#3826 ·
Maintainer thường phản hồi trong vòng 1 ngày