[BUG] A2A lookups by task or context ID reveal whether another user's resource exists
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 go/core/internal/service/session/interactions.go 中的 storedSession (L83-94) 和 interactionError 映射 (L713-714) 开始;然后阅读调用点 taskSession (L615-630)、SendMessage (L456-458) 和 ListTasks (L637)。针对 A2A controller 复现 issue 中的四个步骤,以查看三个不同的错误响应。完成条件是:未知 ID、另一个用户的会话以及另一个 Agent 的会话都返回 TASK_NOT_FOUND,而能够读取该会话但缺少该 verb 的调用方仍然收到权限错误。
由索引模型根据 Issue 内容生成。
描述
📋 Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
- I am using the latest version of the software (checked against
mainat e8cd153) - I have tried to clear cache/cookies or used incognito mode (if ui-related)
- I can consistently reproduce this issue
🎯 Affected Service(s)
Controller (A2A gateway)
🚦 Impact/Severity
Minor
🐛 Bug Description
The A2A gateway tells a caller whether a task or context it may not read exists. A2A 1.0.1 §3.3.2 says servers MUST NOT reveal the existence of resources the client is not authorized to access. IDs are random, so the impact is low, but the MUST is not met.
Every lookup goes through storedSession (interactions.go L83-94), which answers in three different ways:
- unknown ID:
TASK_NOT_FOUND - another user's session: a permission error, since
interactionErrormapsCodePermissionDeniedtoErrUnauthorized(L713-714) - a session that belongs to a different Agent:
ErrUnauthorizedwith "context does not belong to this Agent" (L91-92)
This affects GetTask, CancelTask and SubscribeToTask through taskSession (L615-630), and also SendMessage with a taskId or contextId (L456-458) and ListTasks with a contextId (L637).
🔄 Steps To Reproduce
- User A sends a message to Agent X and notes the returned task ID and context ID.
- User B calls
GetTaskon Agent X with A's task ID, then with a random ID. - User B calls
ListTaskson Agent X with A's context ID, then with a random one. - User A calls
GetTaskon Agent Y with their own task ID.
🤔 Expected Behavior
Every call returns TASK_NOT_FOUND.
📱 Actual Behavior
Steps 2 and 3 return a permission error for A's IDs and TASK_NOT_FOUND for random ones. Step 4 returns "context does not belong to this Agent".
🔍 Additional Context
The fix belongs in storedSession: answer not-found when the caller cannot read the session, or when it belongs to another Agent. A caller who can read a session but lacks the verb for the operation (for example, a read-only share user who sends a message) may still get a permission error, since they already know it exists.
- 主要语言
- Go
- 星标
- 4.5k
- 派生
- 937
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 150
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3792 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kagent-dev/kagent#3790 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
kagent-dev/kagent#3789 ·
维护者通常 1 天内回复
-
[BUG] Python memory summarization fails for Gemini models: the request has no model name可能已有人在做 @BahaaMattar 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3710 ·
维护者通常 1 天内回复
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)可能已有人在做 @talcoh2x 于 14 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100
kagent-dev/kagent#3571 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 68/100
linagora/cozy-stack#5374 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
google/certificate-transparency-go#1859 ·
维护者通常 1 天内回复
-
[Bug]: gate 缺失未关闭bug
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 64/100
newrelic/newrelic-cli#1958 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pingcap/monitoring#1284 ·
维护者通常 1 天内回复