Skip to content

fix(hooks): drop unpinned npx launcher string from hooks tree - #1205

Merged
boshu2 merged 1 commit into
mainfrom
fix/plugin-hooks-unpinned-npx
Oct 9, 2026
Merged

boshu2 merged 1 commit into
mainfrom
fix/plugin-hooks-unpinned-npx

Conversation

@boshu2

@boshu2 boshu2 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

What the validator said

The Claude Code plugin marketplace validator, run on main @ f9c4b1c, raised one blocking finding:

UNPINNED_NPX (blocking): hooks/guards/hooks/policy-dispatch.sh ... runs npx (via shell expansion): the program is computed at run time ...

It also raised two informational HOOK_OUTPUT_UNINSPECTED notes (PreToolUse Bash and Edit|Write). Those aren't blockers; a reviewer reads the hook.

What changed

  • hooks/guards/references/INSTALLED-SKILL-EDIT-GUARD.md: the only npx text under hooks/ was two lines of prose naming npx skills@latest update / add. They now say "the next skills-CLI update (or a re-run of the skills-CLI add command)". The meaning is the same, and no launcher string is left in the hooks tree.
  • policy-dispatch.sh is unchanged on purpose. I audited it: every command word is spelled literally (jq, grep, printf, date, mkdir, cat, cut, sed, dirname, sha256sum/shasum/openssl). No variable or $(...) sits in command position and there is no eval. Changing it would be churn with no evidence behind it.
  • The other guard scripts (installed-skill-edit-guard.sh, read-budget-guard.sh, codex-read-budget-guard.sh, scripts/install-hooks.sh, scripts/lint-policies.sh) contain no launcher strings and no curl|wget ... | sh.

Checks

  • grep -rnE "npx|bunx|pnpm dlx|yarn dlx|uvx|pipx run|uv run" hooks/: no matches (rc=1)
  • bats --print-output-on-failure tests/scripts/policy-dispatch.bats: 51/51 ok
  • shellcheck -S warning hooks/guards/hooks/*.sh hooks/guards/scripts/*.sh: clean
  • bash hooks/guards/scripts/lint-policies.sh: OK (5 policies)
  • claude plugin validate .: Validation passed (manifest check only; it does not run the security screens)

Not verified

The marketplace validator's matching heuristic is undocumented and can't be run locally. My working assumption is that it scans the hooks tree as a unit and pinned the prose hit to the script. A re-run of the marketplace screen will confirm or refute that.

The plugin marketplace validator flagged UNPINNED_NPX against
hooks/guards/hooks/policy-dispatch.sh. The script runs no launcher; the only
npx text under hooks/ was prose in INSTALLED-SKILL-EDIT-GUARD.md naming an
@latest skills-CLI command. Reword it so no launcher string remains under
hooks/.
@github-actions github-actions Bot added the hooks label Oct 9, 2026
@boshu2
boshu2 merged commit bc79a29 into main Oct 9, 2026
6 checks passed
@boshu2
boshu2 deleted the fix/plugin-hooks-unpinned-npx branch October 9, 2026 23:08
boshu2 added a commit that referenced this pull request Oct 10, 2026
claude plugin validate warned that the unquoted placeholder can split on a
path containing spaces. Regenerated plugin/ after #1205 and #1206 merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant