Skip to content

Rule Reference

SEC661lintai-ai-securitystablehookdeny

Hook script: insecure chmod

Hook script performs an insecure permission change

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 insecure chmod payloads in executable hook lines.

Deterministic signal basis

HookSignals shell-token analysis over non-comment hook lines for `chmod 777`, `chmod 0777`, or symbolic world-writable modes such as `a+rwx`.

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

World-writable permission changes like chmod 777 create broad write access and often turn local files or sockets into privilege-escalation footholds.

What Triggers

SEC661 matches executable hook lines that run insecure chmod modes such as chmod 777, chmod 0777, or symbolic world-writable modes like a+rwx.

False Positives

This can appear in rough local setup scripts, but shared committed hooks should not silently open files to all users.

Remediation

Replace broad chmod modes with the minimum required permissions and keep host permission changes out of shared hooks when possible.