Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Permission rule delegates fail on Windows for .cmd/.bat programs and can't take arguments

Chiusa
#178 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
desktop, security

Direzione di ricerca

Start with src/main/agent/permissions.ts and inspect runDelegate around line 71, then trace its permission-rule callers and existing tests. Reproduce the Windows .cmd/.bat spawn failure and the to: "node check.js" case; add tests for both supported argument forms. Done when those cases work as intended and the tests pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug platform: windows priority: low security severity: medium

Found in the 2026-10-07 code review and confirmed: spawning a .cmd without a shell throws spawn EINVAL on current Node.js.

Problem

runDelegate (src/main/agent/permissions.ts:71) calls spawn(program, [], …) without a shell. On Windows, .cmd/.bat files can't be spawned that way since the CVE-2024-27980 fix. Every matching tool call is then "Blocked by a permission rule … failed: spawn EINVAL". A value like to: "node check.js" fails with ENOENT on every OS, because the whole string is treated as the program name.

Fix

Accept to as { program, args } (or an argv array), or run .cmd/.bat through cmd.exe /d /s /c with properly quoted arguments. Document that to names a single executable. Add tests for both forms.

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
8h 28m
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.