fix(hooks): fail closed on crash in the remaining blocking hook rows
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
调研方向
先阅读 worktree-add-containment、pr-body-linkage、pr-linkage-mcp、test-weaken 和 run-python-hook 的 hook 行,以及 exec-bash.mjs 的文件头和 issue #8569。更新每个列出的阻塞行,使崩溃、缺少 bash、node 启动失败、超时和 Git Bash 崩溃都会阻止调用;该 issue 将具体机制留给后续的 hardening 审查。完成标准是每种列出的故障模式都会拒绝工具调用。
由索引模型根据 Issue 内容生成。
描述
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.mjsheader). - 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.
- 主要语言
- Shell
- 星标
- 22
- 派生
- 2
- 平均合并
- 7 小时 23 分钟
- 30 天内合并 PR
- 950
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
melodic-software/claude-code-plugins 的其他 Issue
-
fix(session-flow): redact.py misses bare sk-ant-oat01- tokens and stateless ghs_ tokens with dots未关闭needs-human
难度 2/5 1-3 小时 新手友好度 82/100
melodic-software/claude-code-plugins#9026 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-human
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#9013 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
melodic-software/claude-code-plugins#9000 · 3 条评论 ·
维护者通常 1 天内回复
-
needs-human
难度 2/5 1-3 小时 新手友好度 73/100
melodic-software/claude-code-plugins#8998 ·
维护者通常 1 天内回复
-
fix(source-control): ready hold check treats hyphenated identifiers containing wip as a WIP marker未关闭priority: medium
难度 2/5 1-3 小时 新手友好度 77/100
melodic-software/claude-code-plugins#8977 · 1 条评论 ·
维护者通常 1 天内回复
查看 melodic-software/claude-code-plugins 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
koalaman/shellcheck#3593 ·
-
automated issue report
难度 1/5 1 小时以内 新手友好度 78/100
a2aproject/A2A#2381 ·
维护者通常 3 天内回复
-
e2e-failure ready-to-code
难度 1/5 1 小时以内 新手友好度 82/100
redhat-developer/rhdh-plugin-export-overlays#4485 · 1 条评论 ·
维护者通常 1 天内回复
-
DSH /pwf-status reports no plan when PLAN_ID is required可能已有人在做 @kuei51307-hub 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
OthmanAdi/planning-with-files#332 · 1 个 reaction ·
维护者通常 1 天内回复