Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(hooks): fail closed on crash in the remaining blocking hook rows

Đang mở Phù hợp với người mới
#8,799 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, node.js, shell
Lĩnh vực
devtools, security

Hướng nghiên cứu

Bắt đầu bằng cách đọc các dòng hook của worktree-add-containment, pr-body-linkage, pr-linkage-mcp, test-weaken và run-python-hook, cùng với phần header của exec-bash.mjs và issue #8569. Cập nhật từng dòng chặn được liệt kê để các sự cố crash, thiếu bash, lỗi khởi chạy node, hết thời gian chờ và sự cố crash của Git Bash đều chặn lời gọi; issue để cơ chế này cho đợt rà soát hardening sau. Hoàn tất khi mọi chế độ lỗi được liệt kê đều từ chối lời gọi công cụ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

priority: low status: confirmed

Refs: #8569, #8282

Outcome

Every blocking hook row whose crash should deny the tool call fails closed: a bash crash, missing bash, a node start failure, the 60 s timeout, or a Git Bash crash read as exit 0 blocks the call instead of allowing it.

Current behavior

#8569 (PR #8674) adds an opt-in --fail-closed flag to exec-bash.mjs, passed only by the guardrails guard rows. These blocking rows in other plugins do not pass it, so a crash in any of the cases above allows the call (GitHub Security & Cost review of #8674 at e8309efd4b, 2026-10-21):

  • source-control: worktree-add-containment, pr-body-linkage, pr-linkage-mcp
  • testing: test-weaken
  • disk-hygiene: run-python-hook

Desired behavior

Each row above fails closed on every failure mode listed in Outcome. Claude Code's hook onFailure: "block" setting (v2.1.295+, https://code.claude.com/docs/en/hooks) covers all of them, including the cases --fail-closed cannot see (missing bash, node start failure, timeout).

Out of scope

  • Non-blocking rows (formatters, linters), whose fail-open is deliberate (exec-bash.mjs header).
  • The guardrails rows, covered by #8569.

Notes

Severity low; queued for the #8282 deferred-hardening review (2026-11-18) unless the owner wants it sooner. Which mechanism (onFailure: "block" per row vs --fail-closed) is a design choice for that review.

Ngôn ngữ chính
Shell
Star
22
Fork
2
Merge trung bình
7 giờ 57 phút
Pull request đã merge (30 ngày)
938

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của melodic-software/claude-code-plugins

Tất cả issue của melodic-software/claude-code-plugins

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.