security: `serve` has no Host allowlist, so a passwordless server answers DNS-rebinding pages
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start by reading server.ts around the password and browserOriginRefusal checks, then inspect the /altimate/* routes and the existing isTraceShaped list handling. The issue proposes a Host allowlist and also raises trace shape checking and prompt title exposure; agree on scope and expected behavior before implementation. Done means the chosen protections are covered by tests for allowed and refused hosts and the reported trace cases.
由索引模型根据 Issue 内容生成。
描述
Found during the v0.12.7 release review (CTO, tech lead and compliance reviewers). Deferred because it changes how every serve route is reached, not just this release's.
With no OPENCODE_SERVER_PASSWORD, basic auth is skipped (server.ts ~300) and browserOriginRefusal passes any request without an Origin header. A same-origin fetch after DNS rebinding sends no Origin and Sec-Fetch-Site: same-origin, so it gets through. The server never checks Host. Not verified with a live rebinding; read from the code.
This is the posture of every serve route, but #1415's /altimate/trace routes now serve prompts, SQL and query results, which raises the stakes.
Proposed: refuse any request whose Host isn't loopback (localhost, 127.0.0.1, [::1]) or the configured hostname, at least on /altimate/*.
Related, same routes:
GET /altimate/trace/:id/viewdoesn't shape-check the file like the list does (isTraceShaped), so a foreign JSON file named<id>.jsonrenders a broken page (500) instead of a 404.- The list falls back to the raw first prompt as a trace's title (
server.ts~1301), so prompt text appears in list JSON. Consider truncating it.
(v0.12.7 already adds a CSP to the viewer page so script in trace content can't call the API.)
- 主要语言
- TypeScript
- 星标
- 812
- 派生
- 123
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 97
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AltimateAI/altimate-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
AltimateAI/altimate-code#1454 ·
维护者通常 1 天内回复
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)未关闭
难度 2/5 1-3 小时 新手友好度 78/100
AltimateAI/altimate-code#1386 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
AltimateAI/altimate-code#1384 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
AltimateAI/altimate-code#1323 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
AltimateAI/altimate-code#1288 ·
维护者通常 1 天内回复
查看 AltimateAI/altimate-code 的全部 Issue
相似的 Issue
-
[BUG] rag: sentence content can cross the reported sentence boundaries可能已有人在做 @LJK-ikun 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URI未关闭
难度 1/5 1 小时以内 新手友好度 88/100
platformatic/mcp#361 ·
维护者通常 1 天内回复
-
frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nada未关闭
难度 2/5 1-3 小时 新手友好度 76/100
melgarafael/DeskcommCRM#3164 ·
维护者通常 1 天内回复