Skip to content

Rule Reference

SEC634lintai-ai-securitystablehookdeny

Hook script: password file access

Hook script accesses a sensitive system password file

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 direct access to sensitive password and sudo policy files in executable hook lines.

Deterministic signal basis

HookSignals path detection over non-comment hook lines for `/etc/shadow`, `/etc/passwd`, `/etc/sudoers`, `/etc/gshadow`, or `/etc/master.passwd`.

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

Reading files such as /etc/shadow or /etc/sudoers from a hook exposes host credential and privilege data to repository-controlled automation.

What Triggers

SEC634 matches executable hook lines that directly reference sensitive system password or privilege files, including /etc/shadow, /etc/passwd, /etc/sudoers, /etc/gshadow, and /etc/master.passwd.

False Positives

Legitimate host-auditing tools can touch these files, but that is still high-risk in shared hook scripts because the repository is gaining visibility into host authentication data.

Remediation

Remove direct access to system password files from the hook. Keep hook behavior scoped to project-local files or move any host-audit workflow into a separately reviewed admin tool.