feat(observability): allowlist phase-label names to prevent path/secret leakage in TUI

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
typescript
領域
cli, observability

調査の方向性

packages/opencode/src/session/status.ts の SessionStatus.publishPhase から始め、警告がどのようにログに記録されるかを確認します。packages/tui/src/util/phase-label.ts と既存の unit test の規約を確認し、未登録の名前に対するカバレッジを追加します。不明な名前が警告されて破棄され、登録済みのフェーズラベルが引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Deferred from the v0.9.3 pre-release review.

Current behavior

SessionStatus.publishPhase(name, ...) in packages/opencode/src/session/status.ts accepts any string for the name argument. Today the set produced by bootstrap.* spans is static and benign, and the TUI's packages/tui/src/util/phase-label.ts falls back to "Thinking..." on unknown names.

Gap

There is no validation at the publishPhase call site that the name is limited to a registered set. A future span whose name accidentally embeds a filesystem path, a secret, or a sensitive env reference would surface as a user-visible TUI label without any signal that it was unintended.

Proposal

Add a Set<string> of known phase names. publishPhase logs a warning (not throws) when an unregistered name is used and drops the label. Cover with a unit test that asserts a warning fires on an unregistered name so a regression is loud.

Why deferred

Guardrail against a future regression; the current phase-name set is static and benign so there is no user-visible risk today.

主要言語
TypeScript
スター
813
フォーク
134
平均マージ
2日 5時間
マージ済み PR(30日)
62

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

AltimateAI/altimate-code のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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