CommandCodeAI / CommandCodeAI/command-code
Permission prompts show only tool descriptions instead of the actual shell command
まだ誰も着手していません。
- 主要言語
- 言語のデータがありません
- スター
- 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
-
Install Command Code through npm:
npm install -g command-code -
Start a normal interactive session without auto-accept or bypass mode:
cmdc --permission-mode default -
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. -
Wait for the permission prompt.
-
Observe that the prompt displays only a generic description, such as:
Create a new file at specified path without overwriting -
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
npm で command-code をインストールして問題を再現し、その後 PowerShell で cmdc --permission-mode default を実行してファイルの作成を要求します。まず権限プロンプトのエントリポイントを追跡し、表示されるツールの説明と、要求されたコマンドおよび引数を比較します。プロンプトに完全な PowerShell コマンドが表示され、汎用的な説明があればそれも維持され、報告されたシナリオで動作が検証されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- cli, security
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 64/100