Skip to content

Rule Reference

SEC647lintai-ai-securitythreat-reviewsecuritystablejsonwarn

Plugin hook: shell profile write

Plugin hook command writes to a shell profile startup file

Public lane
threat-review
Category
security
Provider
lintai-ai-security
Scope
per-file
Surface
json
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message only
How to read this lane

Explicit malicious, secret-bearing, or spyware-like review.

How to read this category

Strong exploit, secret, or unsafe-execution signal.

Activation Model

Preset Activation

These presets explain where this rule appears in the product experience.

Lifecycle

Stable Lifecycle Contract

State

stable

Graduation rationale

Checks committed plugin hook command values for explicit writes to shell startup profile files.

Deterministic signal basis

JsonSignals command-string analysis over ArtifactKind::CursorPluginHooks using redirection-or-tee targeting of `.bashrc`, `.bash_profile`, `.zshrc`, or `.profile`.

Malicious corpus
plugin-hook-command-persistence-escalation
Benign corpus
plugin-hook-command-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule positioned as an explicit threat-review control: high-signal malicious, credential-bearing, or spyware-like behavior that stays opt-in rather than shaping the quiet default.

Nearby Signals

Related Rules

Why It Matters

A plugin hook that edits shell startup files can create persistence on the host and alter later terminal sessions outside the repository workflow.

What Triggers

SEC647 matches plugin hook command strings that write to .bashrc, .bash_profile, .zshrc, or .profile through redirection or tee.

False Positives

Dotfile-management plugins are the main edge case, but silent startup-file mutation in generic plugin hooks is still risky enough to review.

Remediation

Remove the shell-profile write from the hook. Prefer repo-local state, or require an explicit reviewed install step for host shell configuration changes.