--allow-tool='shell(docker ps)' doesn't work
- 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
https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#tool-permission-patterns - documentation mentions `shell(git push)` as an example pattern for --allow-tool. This seems to imply that there's a flexible mechanism for allowing subcommands (we don't have to allow all `git` commands, we can pick specific subcommands like `git push` to allow).
This does work for `git` (I tested it with `git status`) but doesn't work for other commands. For example:
```copilot --model gpt-5-mini --allow-tool='shell(docker ps)' -p 'Run this command in Bash: `docker ps`'```
This doesn't work. Same with `shell(docker ps:*)`
### Affected version
GitHub Copilot CLI 1.0.21.
### Steps to reproduce the behavior
```copilot --model gpt-5-mini --allow-tool='shell(docker ps)' -p 'Run this command in Bash: `docker ps`'```
### Expected behavior
Expected the `docker ps` command to be allowed to run, without asking for permissions. But instead seeing "Permission denied and could not request permission from user"
### Additional context
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lệnh được báo cáo với GitHub Copilot CLI 1.0.21, so sánh shell(git status) với shell(docker ps) và shell(docker ps:*). Đọc tài liệu tool-permission-patterns được liên kết trong issue và lần theo entry point xử lý permission pattern. Được xem là hoàn tất khi pattern docker ps được tài liệu hóa chạy mà không có permission prompt, trong khi các lệnh không liên quan vẫn được bảo vệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- docker, shell
- Lĩnh vực
- cli, security
- 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
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100