Skip to content

Rule Reference

SEC641lintai-ai-securitystableclaude_settingswarn

Claude settings: command hook root deletion

Claude settings command hook attempts destructive root deletion

Provider
lintai-ai-security
Surface
claude_settings
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 Claude settings command hooks for explicit `rm`-style destructive root deletion payloads.

Deterministic signal basis

ClaudeSettingsSignals command-hook string analysis over committed hook entries with type == command for `rm` with recursive+force flags targeting `/` or using `--no-preserve-root`.

Malicious corpus
claude-settings-hook-persistence-escalation
Benign corpus
claude-settings-network-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

Claude command hooks run automatically from shared settings. A hook that can wipe / turns a repo config file into a host-destruction primitive.

What Triggers

SEC641 matches Claude settings command hooks whose command runs rm with recursive and force semantics against / or uses --no-preserve-root.

False Positives

This is rare and usually intentional if present. In shared committed Claude settings, that should still be treated as unsafe.

Remediation

Remove the root-targeting delete command from the hook. If cleanup is necessary, scope it to a reviewed workspace path and avoid destructive host-level flags.