github / github/copilot-cli

Secret filtering can block the CLI UI thread

未關閉
#3,900 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:sessions area:terminal-rendering
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
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 摘要。