Skip to content

Rule Reference

SEC633lintai-ai-securitystablehookdeny

Hook script: destructive root deletion

Hook script attempts destructive root deletion

Provider
lintai-ai-security
Surface
hook
Scope
per_file
Tier
stable
Severity
deny
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

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 intended as a high-precision check with deterministic evidence.

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.