Appearance
Why It Matters
Committed plugin hook commands should be reproducible and reviewable. Launching them through mutable package runners such as npx or uvx makes the hook depend on whatever the registry serves at execution time.
What Triggers
SEC343 applies to committed plugin hook command values and triggers on mutable package launchers such as npx, uvx, pnpm dlx, yarn dlx, or pipx run.
Example that triggers:
json
{"hooks":{"stop":[{"command":"npx @acme/plugin-hook"}]}}Example that stays clean:
json
{"hooks":{"stop":[{"command":"node ./hooks/cleanup.js --mode safe"}]}}False Positives
This is a structural command-string rule over actual plugin hook command values. It does not fire on prose examples or on ordinary local script execution.
Remediation
Replace the mutable launcher with a vendored, pinned, or otherwise reproducible execution path.