github / github/copilot-cli

permissions-config.json commandIdentifiers with spaces still require approval

オープン
#4,150 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:configuration area:permissions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
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
    {
      "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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず ~/.copilot/permissions-config.json と一覧にある commandIdentifiers を使って承認動作を再現し、次に Copilot CLI のコマンド承認処理を追跡します。設定した場合に "make fix" が承認なしで実行され、既存のより広範な "make" の動作が引き続き正しいことを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli, security
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。