Rewind file tracking backs up gitignored secret files; add an exclude or an off switch
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
The report identifies enableFileChangeTracking as the interactive CLI entry point and session-state/<session-id>/rewind-file-snapshots/backups/ plus index.json as the affected output. Start by tracing how the CLI enables tracking and how the tracker selects and writes files; the issue does not name source files or tests. Done means secret-file backups can be excluded or tracking disabled, and backups use mode 600.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: Copilot CLI 1.0.91, Linux x64, interactive mode.
What happens
Since /rewind became git-free (1.0.78), the CLI saves the earlier content of every file that a turn changes under the session's working directory into session-state/<session-id>/rewind-file-snapshots/backups/. Gitignored files are included. When the agent edits a .env file in a turn (for example to rotate an API token), the old file, with every secret in it, stays in session state as a plain file at mode 644. It stays there after the session ends.
A session with one long autonomous turn has one snapshot, so every file that turn changes is held in that snapshot.
What I checked
copilot help config,copilot help environmentandcopilot --helpname no setting, flag or variable for rewind file tracking.respectGitignorecovers only the@file picker.- The interactive CLI starts each session with
enableFileChangeTrackingset totrueas a constant. Only SDK clients can pass the option. - The tracker skips a file only for its size, a non-regular file or an unverifiable identity. It does not skip files that
.gitignoreexcludes or files that hold secrets.
Steps to reproduce
- In a git repository, put
.env.localin.gitignoreand give it a line such asEXAMPLE_TOKEN=old-value. - Start
copilotin that repository and ask it to change the value tonew-valuewith a shell command. - List
session-state/<session-id>/rewind-file-snapshots/backups/. One file holdsEXAMPLE_TOKEN=old-value, andindex.jsonmaps it to.env.local.
Expected
A secret file that Copilot edits does not stay copied in session state. Any one of these would do:
- Skip files that
.gitignoreexcludes, or files that match.env*, when the tracker saves earlier content./rewindthen lists them as not restorable. - A setting, for example
rewind.excludePatterns, that takes path patterns the tracker skips. - A setting or flag that turns off file tracking, leaving conversation-only rewind.
Also: write the backups at mode 600, the same as the other session files.
- Ngôn ngữ chính
- Shell
- Star
- 11.3k
- Fork
- 2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
area:models area:sessions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-cli#5189 · 1 reaction ·
-
area:configuration area:input-keyboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
github/copilot-cli#5159 ·
-
area:sessions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#5147 · 1 bình luận ·
-
area:input-keyboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
github/copilot-cli#5113 ·
-
area:sessions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4996 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
package-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
canUseTool drops decision_reason_type and classifier_approvable from the can_use_tool requestĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jangala-dev/devicecode-lua#344 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cov-lineages/pangolin#583 · 1 bình luận ·