CommandCodeAI / CommandCodeAI/command-code
Permission prompts show only tool descriptions instead of the actual shell command
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4k
- Forks
- 350
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem, indem du command-code mit npm installierst. Führe anschließend cmdc --permission-mode default in PowerShell aus und fordere die Erstellung einer Datei an. Beginne damit, den Einstiegspunkt der Berechtigungsabfrage nachzuverfolgen, und vergleiche die angezeigte Tool-Beschreibung mit dem angeforderten Befehl und seinen Argumenten. Als abgeschlossen gilt die Aufgabe, wenn die Abfrage den vollständigen PowerShell-Befehl anzeigt und dabei eine etwaige allgemeine Beschreibung beibehält und das Verhalten für das gemeldete Szenario verifiziert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- powershell
- Bereich
- cli, security
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 64/100