Skip to content

Rule Reference

SEC636lintai-ai-securitystablehookdeny

Hook script: authorized_keys write

Hook script writes to SSH authorized_keys

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 writes to SSH `authorized_keys` in executable hook lines.

Deterministic signal basis

HookSignals redirection-or-tee detection for `authorized_keys` targets in non-comment hook lines.

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

Modifying authorized_keys grants or preserves SSH access on the host. That is a direct persistence and access-control change, not ordinary hook behavior.

What Triggers

SEC636 matches executable hook lines that write to an authorized_keys target through redirection or tee.

False Positives

Provisioning tools may manage SSH keys intentionally, but repository hooks should not silently change host login access. Keep this enabled unless the repository is explicitly dedicated to reviewed machine bootstrap.

Remediation

Remove the authorized_keys write from the hook. Handle SSH key provisioning in a separate reviewed admin workflow instead of repository-controlled automation.