Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#8,799 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, node.js, shell
领域
devtools, security

调研方向

先阅读 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 内容生成。

描述

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.

主要语言
Shell
星标
22
派生
2
平均合并
7 小时 23 分钟
30 天内合并 PR
950

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。