docs(hooks): narrow denylist header comment to its actual scope (#314) - #334
Merged
Conversation
The header claimed it "blocks destructive commands," which reads as a general destructive-command sandbox. It is a targeted backstop over a fixed pattern set (git history/branch operations, rm recursive-force, pipe-to-shell/eval RCE) that FAILS OPEN. Rewrite the doc comment to state the real scope and fail-open stance so it is not mistaken for a security boundary. Comment-only; no rule logic or behavior changed (AC-314.1). Closes #314 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SATRHKa6mDHDuirhP6QuwL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The
plugin/hooks/denylist.mjsheader comment overstated coverage — "Blocksdestructive commands" reads as a general destructive-command sandbox. In reality
the hook is a targeted backstop over a fixed pattern set (git history/branch
operations,
rmrecursive-force outside build/temp dirs, and pipe-to-shell /eval-of-substitution RCE) that FAILS OPEN. This rewrites the header doc
comment to state the real scope and the fail-open stance, so it is not mistaken
for a security boundary.
Documentation-accuracy fix only. No rule logic or runtime behavior changed —
only the header comment block was edited.
Closes #314
Acceptance criteria
TARGETED backstop (git history/branch/reset/clean + rm recursive-force +
pipe-to-shell/eval) that FAILS OPEN, not a general destructive-command sandbox.
Verified: new header enumerates the exact RULES set, explicitly says "NOT a
general destructive-command sandbox" and "FAILS OPEN by design ... exit 0 ...
can never take the session down"; behavior unchanged.
Verification
pnpm verify(vitest) — 54 files / 618 tests, all green (comment-only change,no test drift).
claude plugin validate ./plugin --strict— validation passed.git diffconfirms nocode lines touched.
vitest runonly (acgate is not a CI gate here and there is no plan file mappingAC-314.1), so scope was kept minimal per ticket guidance.