Skip to content

Rule Reference

SEC649lintai-ai-securitystablehookdeny

Hook script: cron persistence

Hook script manipulates cron 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 cron manipulation or cron file writes in executable hook lines.

Deterministic signal basis

HookSignals command-or-write-target detection over non-comment hook lines for `crontab` mutation or writes to `/etc/cron*` and `/var/spool/cron`.

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

Cron changes create scheduled persistence outside the repository workflow. A shared hook should not silently install recurring host tasks.

What Triggers

SEC649 matches executable hook lines that mutate cron through crontab or write cron persistence files such as /etc/crontab, /etc/cron*, or /var/spool/cron.

False Positives

Bootstrap repositories may manage cron intentionally, but silent recurring-task installation in a shared hook remains high-risk.

Remediation

Remove cron persistence from the hook and move scheduled-task setup into a separate reviewed admin workflow.