github / github/copilot-cli

permissions-config.json commandIdentifiers with spaces still require approval

未关闭
#4,150 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
area:configuration area:permissions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

Following the examples in https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference#examples I'm trying to add "make fix" as command to be automatically allowed and it's not working, permission is always requested.

OTOH adding just "make" makes all make commands automatically allowed.

### Affected version

GitHub Copilot CLI 1.0.71.

### Steps to reproduce the behavior

1. Write this in `~/.copilot/permissions-config.json`
```json
{
"locations": {
"/some/path": {
"tool_approvals": [
{
"kind": "commands",
"commandIdentifiers": [
"make fix",
"make:fix",
"make(fix)",
"shell(make fix)",
"bash(make fix)"
]
}
]
}
}
}
```
2. `cd /some/path && copilot`
3. say "run make fix"

### Expected behavior

no questions asked

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

首先使用 ~/.copilot/permissions-config.json 和列出的 commandIdentifiers 重现批准行为,然后跟踪 Copilot CLI 的命令批准处理流程。完成的标准是:在完成配置后,"make fix" 无需批准即可运行,同时现有的更宽泛的 "make" 行为仍保持正确。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli, security
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
描述清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。