fix(guardrails): block-root-delete-target skips a PowerShell target holding a literal dollar sign
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #7071 de @kyle-sexton — fusionado
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 rdfrom Bash case is either judged or listed as a declared gap.
Related: #6020. Found by the security review of #6542.
- Lenguaje dominante
- Shell
- Estrellas
- 22
- Forks
- 2
- Merge medio
- 7 h 8 min
- PR fusionados (30 d)
- 874
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de melodic-software/claude-code-plugins
-
needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
melodic-software/claude-code-plugins#8405 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melodic-software/claude-code-plugins#8374 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-human priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
melodic-software/claude-code-plugins#8366 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
melodic-software/claude-code-plugins#8341 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melodic-software/claude-code-plugins#8338 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de melodic-software/claude-code-plugins
Issues similares
-
[安全] 为粘贴到 Shell 的代码引用转义路径Posiblemente ocupada @myot233 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
facebookincubator/muse-gadget-sdk#249 ·
Los mantenedores suelen responder en 1 día
-
Readme 中 Releases 链接指向的是完整版字库Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
btclib-org/portanode#699 ·
Los mantenedores suelen responder en 1 día