Skip to content

Rule Reference

SEC343lintai-ai-securitysupply-chainhardeningstablejsonwarn

Plugin hook: mutable package launcher

Plugin hook command uses a mutable package launcher

Public lane
supply-chain
Category
hardening
Provider
lintai-ai-security
Scope
per-file
Surface
json
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message only
How to read this lane

Reproducibility, provenance, and dependency hardening review.

How to read this category

Least-privilege, provenance, or operational hygiene signal.

Activation Model

Preset Activation

These presets explain where this rule appears in the product experience.

Lifecycle

Stable Lifecycle Contract

State

stable

Graduation rationale

Checks committed plugin hook command values for mutable package launchers such as npx, uvx, pnpm dlx, yarn dlx, and pipx run.

Deterministic signal basis

JsonSignals command-string analysis over ArtifactKind::CursorPluginHooks objects limited to actual hook command values.

Malicious corpus
plugin-hook-command-mutable-launcher
Benign corpus
plugin-hook-command-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule positioned as a supply-chain hardening control: high-precision and actionable, but not a blanket claim of direct repository compromise.

Nearby Signals

Related Rules

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.