Secret filtering can block the CLI UI thread
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Beginne damit, den synchronen Secret-Scanning-Pfad zu lokalisieren, der von der CLI UI sowie dem Session-Resume-Replay- und Batch-Submission-Ablauf verwendet wird. Reproduziere das Einfrieren mit großen strukturierten Antworten und fortgesetzten Sitzungen und überprüfe anschließend, dass das Scannen die TUI nicht mehr blockiert und fehlgeschlagene Übermittlungen nicht wiederholt dieselben Ereignisse scannen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- shell
- Bereich
- cli, performance, security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100