Skip to content

Rule Reference

SEC645lintai-ai-securitystablejsonwarn

Plugin hook: destructive root deletion

Plugin hook command attempts destructive root deletion

Provider
lintai-ai-security
Surface
json
Scope
per_file
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message_only

Activation Model

Preset Membership

This rule is part of the builtin activation graph through these preset memberships.

Lifecycle

Stable Lifecycle Contract

State

stable_gated

Graduation rationale

Checks committed plugin hook command values for explicit `rm`-style destructive root deletion payloads.

Deterministic signal basis

JsonSignals command-string analysis over ArtifactKind::CursorPluginHooks for `rm` with recursive+force flags targeting `/` or using `--no-preserve-root`.

Malicious corpus
plugin-hook-command-persistence-escalation
Benign corpus
plugin-hook-command-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule intended as a high-precision check with deterministic evidence.

Nearby Signals

Related Rules

Why It Matters

Plugin hooks are executed automatically by installed tooling. A plugin hook that can run rm -rf / gives repository-delivered automation a direct host destruction path.

What Triggers

SEC645 matches plugin hook command strings that run rm with recursive and force semantics against / or use --no-preserve-root.

False Positives

This should be very uncommon. If a plugin hook includes a host-destructive payload, that is normally exactly the behavior reviewers want surfaced.

Remediation

Remove the root-targeting delete command from the plugin hook. If cleanup is needed, keep it scoped to a reviewed plugin-local or workspace-local directory.