Skip to content

docs(guardrails): drop the removed block-hook-bypass guard from hook comments - #15954

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15942-43424230271-1
Nov 13, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15942-43424230271-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15942

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The secret-pattern-detection hook's comments described its temp-tree decline as matching block-hook-bypass, a guard guardrails 0.52.0 removed. They now state each rule in their own terms: when a write into a host temp tree is declined, the root gate's spellings, the bare-operand character allowlist, the lowercased compare, and the 8.3 short-name shape. The same present-tense references are removed from the hook's test-suite comments, from flag-commit-pr-skill-bypass.sh and from lib/powershell/ps-command.sh, so no file in the plugin except CHANGELOG.md names the guard. Only comments change, so behavior does not. I chose to edit the test file's comments too: the second done-when item covers every file in the plugin, and no test case or assertion changed.

Not verified

  • The hook's test suite (plugins/guardrails/hooks/secret-pattern-detection.test.sh) was not run directly: this lane's Bash runs only the named wrappers. Left to the PR's CI. Only comment lines changed, and check-affected passed
  • Tidy dropped the rows for secret-pattern-detection.sh, flag-commit-pr-skill-bypass.sh and secret-pattern-detection.test.sh: wired hook scripts and secret-pattern detection fixtures are on tidy's GLOBAL HARD exclusion list. The ps-command.sh row is a pure deletion and was skipped. On the changelog…
  • Build and lint (shellcheck) not run separately: no allowed wrapper runs them. check-affected covered the changed files, and only comments changed
  • Observation, outside this issue's scope: ps-command.sh still uses present tense for 'the Bash guard' at lines 15-20, 2126-2128, 2786 and 2819. Some of these meant the removed write gate, but none names block-hook-bypass. ps::write_bypass also has no remaining caller, so it looks like dead code.…
  • The working tree also has untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc at the checkout root. This run did not create them (they look like sandbox artifacts), and they are not part of the change

Fix

  • plugins/guardrails/hooks/secret-pattern-detection.sh: header, scope-root note, Temp-tree decline block, spd_under_temp, spd_short_spelling and spd_temp_declines step comments state the exemption rules directly instead of citing block-hook-bypass, its _norm_path or its _bbh_short_component
  • plugins/guardrails/hooks/secret-pattern-detection.test.sh: five comment blocks in the temp-tree decline section describe the decline in its own terms; no test case or assertion changed
  • plugins/guardrails/hooks/flag-commit-pr-skill-bypass.sh: two 'same posture as block-hook-bypass' comment clauses removed
  • plugins/guardrails/lib/powershell/ps-command.sh: removed the comment sentence saying block-hook-bypass consults no allow-list on ps::write_bypass's return
  • .changes/guardrails/work-resolve-issue-issue-15942-43424230271-1-15260782.md: new patch changelog fragment for the comment-only change

Verification

The runner ran each check from the base copy against f24fac7:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • Grep for block-hook-bypass under plugins/guardrails: only CHANGELOG.md matches
  • Grep for block_hook_bypass, bbh_ and _norm_path under plugins/guardrails outside CHANGELOG.md: no match
  • git-read diff --unified=0 HEAD: every changed line in the four source files is a comment line
  • check-changelog-fragments: all 37 fragments valid (run again after tidy: same)
  • check-changed-skills: no changed skills, nothing to gate (run again after tidy: same)
  • check-affected: 13 passed, 6 skipped over 5 changed files (run again after tidy: same)
  • Fresh-context review subagent: no blocking findings. Every rewritten comment matches the code it describes; two cut-short line wraps it flagged were re-flowed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43424230271

Left out: the items under Not verified.

Related

#15942

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed f24fac7a7d331bd19eb3a6ba55b56c0bc6f05da3: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read the whole diff for all 5 changed files. Every changed line in the four guardrails source files is a shell comment (#). The fifth file is a new changelog fragment, .changes/guardrails/...-15260782.md, marked bump: patch and containing prose only. No executable line changed:

  • plugins/guardrails/hooks/secret-pattern-detection.sh: the code under each edited comment is the same as before. That covers the spd_under_temp and spd_short_re / spd_short_spelling logic, the bare-operand character allowlist, the root-gate case refusal list and the short-name resolved-form check. The rewritten comments describe that code correctly. For example, the step-3 root-gate comment matches the case "$r" pattern list at the line under it.
  • plugins/guardrails/hooks/secret-pattern-detection.test.sh: only section-header and explanation comments changed. No test case, assertion or seam extraction changed (the sed range markers ^spd_win=0$ and ^spd_temp_declines "\$FILE" && exit 0$ are untouched).
  • plugins/guardrails/hooks/flag-commit-pr-skill-bypass.sh: two comment clauses that referred to the removed guard were deleted. No logic changed.
  • plugins/guardrails/lib/powershell/ps-command.sh: one comment sentence was deleted. The ((PS_REDUCTION_UNTRUSTED)) && return 0 return it described is still there.

Instruction-surface lens: none of the deleted text is a standing instruction to a model, such as a CLAUDE.md, skill or agent body, or hook block-list or allowlist entry. These are code comments in hook scripts, and the hook block-lists and allowlists they describe are unchanged, so no control was removed. I did not consult the protected-class list in the instruction exception register, because no instruction rule was deleted for it to apply to.

Trusted paths: no changed file matches a TRUSTED PATHS glob. No trust control, merge hold, token scope or plugin manifest is touched.

PR context: I found no text in it directing this lane to pass the PR, skip a check, drop a finding or post elsewhere.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed f24fac7a7d331bd19eb3a6ba55b56c0bc6f05da3: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This pull request changes comments only. It removes mentions of the removed block-hook-bypass guard from four guardrails files and adds a patch changelog fragment. I read every hunk of all 5 changed files.

Accuracy of the rewritten comments. I compared each new comment in secret-pattern-detection.sh with the code it describes at head:

  • spd_under_temp: the comment says the target must fall under a temp candidate both as spelled and lowercased on POSIX. The code at lines 428-438 checks both spellings.
  • Bare-operand character allowlist and the ~ rule: these match lines 513-520.
  • Root-gate comment: it says the root must be absolute and normalized, with no $, backtick, ~ or glob character, and must not be a filesystem or drive root. That matches lines 564-575.
  • Short-name "fully expanded" rule: this matches lines 599-604.

No executable line changed in any of the four source files.

Closing issue #15942, done-when items:

  • "Neither comment names the removed guard; each states the exemption in its own terms": met. Both "as block-hook-bypass exempts" comments now state the rule directly.
  • "No other file in the plugin describes block-hook-bypass as present, outside the changelog": met. I searched plugins/guardrails for block-hook-bypass|block_hook_bypass|_bbh_ and the only match is CHANGELOG.md.
  • "The hook's tests pass unchanged": no test case or assertion changed. The test suite's source-extraction seams at secret-pattern-detection.test.sh lines 1011 and 1282 use sed to pull code out of the hook. They key on the lines ^spd_win=0$, ^spd_temp_declines "\$FILE" && exit 0$, ^spd_et=""$ and ^spd_opt_roots=, and this diff leaves all four untouched. I did not run the suite. The PR author says CI covers it; I have not confirmed that.

Changelog fragment: bump: patch fits a change that touches only comments. No plugin manifest changed, so the manifest checks do not apply.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head f24fac7a7d331bd19eb3a6ba55b56c0bc6f05da3, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for f24fac7

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15954-f24fac7a7d331bd19eb3a6ba55b56c0bc6f05da3, expires on 2026-12-13.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=f24fac7a7d331bd19eb3a6ba55b56c0bc6f05da3 rubric=8.4.16 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 230251c Nov 13, 2026
59 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15942-43424230271-1 branch November 13, 2026 13:31
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 230251cc750b562576c144d595b7cc0fabfceae9; later checks count it verified from this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the removed block-hook-bypass guard from the secret-pattern hook's comments

0 participants