🤖 fix: a Daytona setConfig call without an API key still logs every sandbox out of ssh

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

まず src/node/services/daytona/daytonaAccount.ts:91 から始め、issue に記載された daytona.setConfig のスキーマと DaytonaCredentialsStore.update の動作を確認してください。setConfig({}) のテストを追加し、SSH の include ファイルにあるエイリアスが保持され、キャッシュされたトークンが失効しないことを確認してください。省略または変更されていない API キーによって設定変更時のクリーンアップが実行されなくなるか、スキーマでキーが必須となり、省略が拒否されれば issue は完了です。

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

説明

Follow-up from the Codex review of #7100 (thread: https://github.com/coder/xum/pull/7100#discussion_r4369788514, src/node/services/daytona/daytonaAccount.ts:91).

Problem

The daytona.setConfig schema says an omitted apiKey leaves the key unchanged, and DaytonaCredentialsStore.update({}) writes nothing. DaytonaAccount.setConfig still runs the settings-change cleanup after it: it drops readiness, removes every Xum alias from the ssh include file and revokes the cached tokens. So an API caller that sends {} (for example xum api) logs every running Daytona workspace out of external editors and raw ssh until the next readiness check mints new tokens. The settings page always sends apiKey, so the app itself does not hit this.

Proposed fix

Either skip onSettingsChange when the patch leaves the key unchanged (no apiKey, or the same key), or make apiKey required in the schema and drop the "omitted = unchanged" case. Add a test that setConfig({}) keeps the include file's aliases and revokes nothing.

Why it is deferred

#7100 runs its review loop under a P0/P1-only rule; P2 findings get a tracked follow-up. No caller in the app sends a patch without apiKey.

主要言語
TypeScript
スター
2.1k
フォーク
139
平均マージ
3時間 35分
マージ済み PR(30日)
950

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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