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

fix(guardrails): block-root-delete-target skips a PowerShell target holding a literal dollar sign

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

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

関連するプルリクエストがすでにマージされています。

  • #7071 @kyle-sexton による — マージ済み

評価

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

調査の方向性

Start by tracing the block-root-delete-target hook and its rdt_place_to operand handling for PowerShell single-quoted words; inspect the related work in #6020 and #6542. Reproduce the reported cases, including the cmd /c rd invocation from Bash, and determine whether that lane is wired or a declared gap. Done means literal $ operands and ::$ stream suffixes are judged safely, and the cmd case is judged or documented as a gap.

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

説明

needs-human needs-triage

Problem

block-root-delete-target leaves a PowerShell target alone when it holds a $, even inside single quotes, where PowerShell expands nothing. rdt_place_to returns "leave alone" for any $ in an operand that is not literal, and a PowerShell single-quoted word goes down that path.

On Win32, <dir>::$INDEX_ALLOCATION names the directory itself, so a spelling like the one below may reach a directory the guard would otherwise refuse.

Repro (hook side confirmed; PowerShell runtime side not verified)

With the key unset and cwd /:

  • Remove-Item -Recurse -Force 'D:\some\outside\dir' exits 2 (refused).
  • Remove-Item -Recurse -Force 'D:\some\outside\dir::$INDEX_ALLOCATION' exits 0 (allowed).

Also seen in the same review: cmd /c rd /s /q <dir> issued from the Bash tool exits 0 even for a directory outside the allowed roots. Check whether this is a declared gap or a lane that is simply not wired.

Acceptance

  • A single-quoted PowerShell operand is judged literally: a $ in it does not skip judgment.
  • A ::$INDEX_ALLOCATION (or other ::$ stream) suffix is judged as the directory before it, or refused.
  • The cmd /c rd from Bash case is either judged or listed as a declared gap.

Related: #6020. Found by the security review of #6542.

主要言語
Shell
スター
22
フォーク
2
平均マージ
8時間 44分
マージ済み PR(30日)
926

環境構築

はじめの一歩

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

melodic-software/claude-code-plugins のほかの issue

melodic-software/claude-code-plugins の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

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

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