RFC: context-boundary validation — provenance for untrusted tool/MCP content that can drive tool calls
@sanketpatil06 đang làm issue này rồi.
Từ ngày 14/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
ADK assembles the model's context from sources that are effectively untrusted relative to the tool surface it can reach: tool descriptions (including ones pulled from remote MCP servers), tool outputs, session state written by other agents, and instructions loaded at runtime. None of that content carries provenance the framework tracks, so by the time a call reaches the before_tool_callback pipeline in _tool_caller.py, the callback sees the request but has no first-class way to tell what influenced it — a tool result from a low-trust source looks exactly like the developer's own instruction.
This is the documented "context privilege escalation" pattern: untrusted content in the context window steers the model into calling privileged tools it should never have combined (arXiv 2609.01222 verified this against a dozen agent harnesses). #7076 is the same problem class showing up concretely in the resumable-mode dispatch path.
For related work I checked before filing: #6966 screens tool output via ModelArmor but is vendor-specific screening, and #6099 records decisions for audit after the fact. Neither gives callbacks a general notion of where context content came from.
Describe the solution you'd like
A small opt-in boundary layer, not a new enforcement framework:
- Provenance tags on content entering context — source kind (developer instruction / tool output / MCP server / session state) attached at assembly points ADK already controls (event construction, toolset declarations, state merge).
- That boundary context made visible to the existing
before_tool_callbackpipeline andToolConfirmation, so a callback can ask "were this call's arguments influenced by untrusted sources, and does that source have scope to call this tool?" without re-implementing event archaeology. - Default-allow policy; teams that need it can enforce rules like "MCP tool outputs cannot authorize tool X" or require confirmation on cross-boundary escalation.
Impact on your work
Tool/MCP security is the main blocker we hit when arguing for enterprise agent adoption, and the shape of this API matters a lot. The contribution guide asks for an issue first on substantial features, so before building a minimal prototype and adversarial tests: would this fit better as a core contract on the context/event objects, or as a plugin-level capability reusing the existing callback pipeline? I'd rather align on the direction than open a PR against a guess.
- Ngôn ngữ chính
- Python
- Star
- 21.6k
- Fork
- 4k
- Merge trung bình
- 13 giờ 49 phút
- Pull request đã merge (30 ngày)
- 10
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/adk-python
-
mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
google/adk-python#7217 · 3 bình luận · 1 người được giao ·
-
tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google/adk-python#7206 · 1 bình luận · 1 người được giao ·
-
request clarification tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
google/adk-python#7205 · 2 bình luận · 1 người được giao ·
-
mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google/adk-python#7196 · 1 bình luận · 1 người được giao ·
-
eval request clarification
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
google/adk-python#7146 · 2 bình luận · 1 người được giao ·
Tất cả issue của google/adk-python
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·