Skip to content

Rule Reference

SEC645lintai-ai-securitythreat-reviewsecuritystablejsonwarn

Plugin hook: destructive root deletion

Plugin hook command attempts destructive root deletion

Public lane
threat-review
Category
security
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

Explicit malicious, secret-bearing, or spyware-like review.

How to read this category

Strong exploit, secret, or unsafe-execution 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 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 positioned as an explicit threat-review control: high-signal malicious, credential-bearing, or spyware-like behavior that stays opt-in rather than shaping the quiet default.

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.