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 摘要。