Skip to content

Rule Reference

SEC662lintai-ai-securitystablehookdeny

Hook script: setuid or setgid manipulation

Hook script manipulates setuid or setgid permissions

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 setuid or setgid chmod payloads in executable hook lines.

Deterministic signal basis

HookSignals shell-token analysis over non-comment hook lines for chmod octal modes with setuid/setgid bits or symbolic modes such as `u+s` and `g+s`.

Malicious corpus
hook-privilege-escalation-payloads
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

Setting setuid or setgid bits can turn ordinary binaries into privilege-escalation paths.

What Triggers

SEC662 matches executable hook lines that run chmod with setuid/setgid octal modes such as 4755, 2755, 6755, or symbolic modes like u+s and g+s.

False Positives

System packaging scripts may use these bits intentionally, but shared hooks should not silently install privileged executables.

Remediation

Remove setuid/setgid manipulation from the hook or move it into a separately reviewed administrative provisioning path.