Skip to content

Rule Reference

SEC650lintai-ai-securitystablehookdeny

Hook script: systemd persistence

Hook script registers a systemd service or unit for persistence

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 systemd service registration or unit-file writes in executable hook lines.

Deterministic signal basis

HookSignals command-or-write-target detection over non-comment hook lines for `systemctl enable|link` or writes to systemd unit paths.

Malicious corpus
hook-service-persistence
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

Registering systemd units makes repository-delivered automation persist across boots or logins.

What Triggers

SEC650 matches executable hook lines that run systemctl enable or systemctl link, or write unit files into systemd service paths such as /etc/systemd/system/ or user systemd directories.

False Positives

Provisioning scripts may do this intentionally, but it should not happen implicitly from a shared executable hook.

Remediation

Remove systemd registration from the hook and keep service installation in an explicit reviewed provisioning step.