Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

security: `serve` has no Host allowlist, so a passwordless server answers DNS-rebinding pages

オープン
#1,451 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli, security

調査の方向性

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/view doesn't shape-check the file like the list does (isTraceShaped), so a foreign JSON file named <id>.json renders 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時間
マージ済み PR(30日)
97

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。