github / github/copilot-cli

Secret filtering can block the CLI UI thread

オープン
#3,900 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:sessions area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

Copilot CLI does secret scanning synchronously on the UI thread, which can freeze the TUI if taking too long. This can easily happen if the response objects are large because of the single threaded scanning. Also, scanning the response as structured objects with recursion is much slower than scanning by treating it as a single string.

In my situation, the freezing was worsened by the fact Copilot attempted to replay and submit past events when a session was resumed. Up to 500 events will be scanned for secrets at a time with scheduled batches, all happening on the UI thread and causing noticeable TUI freezing. What's more, if the remote submission fails, it will repeatedly scan the same 500 events for up to 5 times

### Affected version

1.0.64-3

### Steps to reproduce the behavior

Make some tool calls with large responses, and observe the TUI freezing

### Expected behavior

TUI shouldn't freeze regardless of the size of the responses or whether they are strings or structured data

### Additional context

_No response_

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

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

調査の方向性

まず、CLI UI と、セッション再開のリプレイおよびバッチ送信フローで使用されている同期 secret-scanning パスを特定します。大きな構造化レスポンスと再開されたセッションでフリーズを再現し、その後、スキャンによって TUI がブロックされなくなったこと、また失敗した送信で同じイベントが繰り返し再スキャンされないことを確認します。

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

評価

技術スタック
shell
領域
cli, performance, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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