Skip to content

Rule Reference

SEC633lintai-ai-securitythreat-reviewsecuritystablehookdeny

Hook script: destructive root deletion

Hook script attempts destructive root deletion

Public lane
threat-review
Category
security
Provider
lintai-ai-security
Scope
per-file
Surface
hook
Tier
stable
Severity
deny
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

Matches explicit `rm`-style destructive root deletion payloads in executable hook lines.

Deterministic signal basis

HookSignals shell-token analysis over non-comment hook lines for `rm` with recursive+force flags targeting `/` or using `--no-preserve-root`.

Malicious corpus
hook-persistence-escalation
Benign corpus
cursor-plugin-clean-basic
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 ​

rm -rf / and related variants are destructive payloads, not normal hook behavior. A committed hook that can erase the host root filesystem is an immediate integrity and availability risk.

What Triggers ​

SEC633 matches executable hook lines that run rm with recursive and force semantics against / or use --no-preserve-root.

Examples include rm -rf /, rm -fr /, and rm --recursive --force --no-preserve-root /tmp/target.

False Positives ​

This should be rare. The rule is aimed at executable hook content, not prose. If a repository intentionally ships destructive host-level cleanup hooks, that is usually worth manual review anyway.

Remediation ​

Remove the root-targeting delete command. If cleanup is required, scope it to a reviewed repo-local path and avoid host-wide destructive flags.