Skip to content

Rule Reference

SEC647lintai-ai-securitystablejsonwarn

Plugin hook: shell profile write

Plugin hook command writes to a shell profile startup file

Provider
lintai-ai-security
Surface
json
Scope
per_file
Tier
stable
Severity
warn
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

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 intended as a high-precision check with deterministic evidence.

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.