Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#178 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
node.js, typescript
領域
desktop, security

調査の方向性

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.

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

説明

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.

主要言語
TypeScript
スター
2
フォーク
2
平均マージ
8時間 28分
マージ済み PR(30日)
26

環境構築

はじめの一歩

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

PierrunoYT/patch のほかの issue

PierrunoYT/patch の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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