allowed_directories in permissions.config is never loaded
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
Describe the bug
I have several directories listed in my permissions-config for various workspaces. They are never loaded. I can run /list-dirs and never see them.
{
"locations": {
"/workspaces/cbreymdev": {
"allowed_directories": [
"/opt/test",
"/tmp"
]
},
...
still results in:
Allowed directories for file access:
1. /workspaces/cbreymdev
2. /tmp
3. /home/vscode/.copilot/installed-plugins
Affected version
1.0.79-6
Steps to reproduce the behavior
sudo mkdir /opt/testsudo chmod a+rwx /opt/testmkdir /opt/test/workspacemkdir /opt/test/subjectecho "Can you read me?" > /opt/test/subject/file.txtjq '.locations += {"/opt/test/workspace": { "allowed_directories": [ "/opt/test/subject"] }}' ~/.copilot/permissions-config.json > /tmp/permissions-config.jsoncp /tmp/permissions-config.json ~/.copilot/permissions-config.jsoncd /opt/test/workspace- run
copilotinteractively - prompt
/list-dirs. Observe that "/opt/test/subject" is not present. - prompt "What does /opt/test/subject/file.txt" contain?. Observe a permission prompt.
Expected behavior
In step 10, the listing should container /opt/test/subject.
In step 11, it should report the contents of /opt/test/subject/file.txt
Additional context
No response
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.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cách ~/.copilot/permissions-config.json được tải khi CLI khởi động, sau đó theo dõi dữ liệu được /list-dirs sử dụng. Tái hiện vấn đề với cấu hình jq được cung cấp và các bước workspace. Được xem là hoàn tất khi allowed_directories từ vị trí đang hoạt động xuất hiện trong /list-dirs và cho phép đọc tệp được liệt kê mà không cần thêm lời nhắc cấp quyền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 65/100