fix(guardrails): block-root-delete-target judges backticks inside a quoted heredoc body
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #7186 của @kyle-sexton — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 22
- Fork
- 2
- Merge trung bình
- 2 giờ 48 phút
- Pull request đã merge (30 ngày)
- 939
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của melodic-software/claude-code-plugins
-
priority: medium status: ready work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melodic-software/claude-code-plugins#10227 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(evals): give the methodology rewrite answer a template whose target slot needs a stated basisĐang mởpriority: medium status: ready work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#10217 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Converge the awk and mjs YAML grammars before setup-apply uses yaml-subset.mjs - part 1 of 4Đang mởpriority: medium status: ready work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
melodic-software/claude-code-plugins#10128 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pr-pipeline: clear a feedback-not-landed escalation once the head moves and no lane thread is openĐang mởpriority: medium status: needs-decision work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
melodic-software/claude-code-plugins#10074 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: medium work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#9842 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của melodic-software/claude-code-plugins
Issue tương tự
-
Icon set for Spotify-launcherĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug priority-medium to-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
WordPress/Documentation-Issue-Tracker#2540 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dsx-ai-factory/infra-controller#8301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100