CommandCodeAI / CommandCodeAI/command-code

Permission prompts show only tool descriptions instead of the actual shell command

オープン
#651 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
言語のデータがありません
スター
4k
フォーク
350
PR マージ指標
30日以内にマージされた PR はありません

説明

Summary

When Command Code requests permission to execute a mutating PowerShell command, the CLI displays only a generic tool description instead of the actual command and its arguments. This prevents users from reviewing exactly what will be executed before granting permission, which creates a significant safety and usability concern.

Expected Behavior

The permission prompt should display the complete command that Command Code is asking to execute, including all arguments, paths, flags, and redirections.
For example, the prompt should show:

New-Item -ItemType File -Path 'C:\Users{UserName}\command-code-permission-test-2.tmp' -Force:$false

The generic tool description may be shown in addition to the command, but it should not replace the command.

Actual Behavior

The CLI displays only a generic description such as:

Create a new file at specified path without overwriting

The actual PowerShell command, including the target path and parameters, is not visible in the permission prompt. The command is therefore difficult or impossible to audit before approval.

Additionally, I found that the fields below with default values cannot be edited. Whenever I try to edit one of these fields, it immediately reverts to its default value. Therefore, I cannot enter the information about my Command Code version, terminal, or shell in the fields below. I am providing the information here instead:

  • Command Code version: 1.14.1 (latest)
  • Terminal: Windows Terminal
  • Shell: PowerShell 7
Steps to reproduce the issue
  1. Install Command Code through npm:
    npm install -g command-code

  2. Start a normal interactive session without auto-accept or bypass mode:
    cmdc --permission-mode default

  3. Ask Command Code to create a new empty file, for example:
    Create a new empty file named command-code-permission-test-2.tmp in C:\Users\12391.

  4. Wait for the permission prompt.

  5. Observe that the prompt displays only a generic description, such as:
    Create a new file at specified path without overwriting

  6. Observe that the actual PowerShell command and its arguments are not displayed.

Command Code Version

Unknown

Operating System

Windows

Terminal/IDE

Unknown

Shell

cmd.exe

Session file (optional)

No response

Fix prompt (optional)

No response

Additional context

No response

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

npm で command-code をインストールして問題を再現し、その後 PowerShell で cmdc --permission-mode default を実行してファイルの作成を要求します。まず権限プロンプトのエントリポイントを追跡し、表示されるツールの説明と、要求されたコマンドおよび引数を比較します。プロンプトに完全な PowerShell コマンドが表示され、汎用的な説明があればそれも維持され、報告されたシナリオで動作が検証されれば完了です。

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

評価

技術スタック
powershell
領域
cli, security
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
64/100

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

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