Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

fix(guardrails): block-root-delete-target judges backticks inside a quoted heredoc body

Cerrado
#6,625 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #7186 de @kyle-sexton — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
shell
Área
security

Línea de trabajo

Start with plugins/guardrails/hooks/block-root-delete-target.sh and the hook-precision conventions in docs/conventions/hook-precision. Add a stay-quiet regression case for the quoted-heredoc payload, and verify that the unquoted-heredoc case remains refused. Done when both acceptance cases pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage priority: medium

Problem

block-root-delete-target refuses a command whose quoted heredoc body (<<'EOF') contains a backticked rm -rf span. The quoted delimiter makes the body inert text: bash runs no command substitution in it. The guard still lifts the backtick span out as a substitution and judges it.

Seen in practice: gh pr create --body-file - <<'EOF' with a PR body that quoted an example command in Markdown backticks was refused. The workaround was to write the body to a file.

Repro

Payload (stdin to plugins/guardrails/hooks/block-root-delete-target.sh):

{"tool_name":"Bash","tool_input":{"command":"cat <<'EOF'\nnote: `rm -rf /`\nEOF"},"cwd":"/"}

Actual: exit 2, "recursive delete of a filesystem root". Expected: exit 0, because the heredoc delimiter is quoted.

Acceptance

  • A stay-quiet case for the payload above fails before the fix (docs/conventions/hook-precision).
  • An unquoted heredoc (<<EOF) whose body holds `rm -rf /` stays refused, because bash does run that substitution.

Related: #6020, found while working #6542.

Lenguaje dominante
Shell
Estrellas
22
Forks
2
Merge medio
8 h 34 min
PR fusionados (30 d)
946

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de melodic-software/claude-code-plugins

Todos los issues de melodic-software/claude-code-plugins

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.