Skip to content

docs(hooks): narrow denylist header comment to its actual scope (#314) - #334

Merged
dngioidev merged 1 commit into
mainfrom
docs/314-denylist-comment-scope
Aug 1, 2026
Merged

docs(hooks): narrow denylist header comment to its actual scope (#314)#334
dngioidev merged 1 commit into
mainfrom
docs/314-denylist-comment-scope

Conversation

@dngioidev

Copy link
Copy Markdown
Owner

What & why

The plugin/hooks/denylist.mjs header comment overstated coverage — "Blocks
destructive 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, rm recursive-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

  • AC.1 — the denylist.mjs header comment accurately states it is a
    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.
  • Diff is a single 12-insertion/3-deletion comment block; git diff confirms no
    code lines touched.
  • No new test added: this is a doc-accuracy AC; the CI verify job runs vitest run only (acgate is not a CI gate here and there is no plan file mapping
    AC-314.1), so scope was kept minimal per ticket guidance.

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
@dngioidev
dngioidev merged commit 596e1fe into main Aug 1, 2026
6 checks passed
@dngioidev
dngioidev deleted the docs/314-denylist-comment-scope branch August 1, 2026 18:42
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.

denylist: narrow the doc comment to its actual scope

1 participant