Skip to content

Rule Reference

SEC635lintai-ai-securitythreat-reviewsecuritystablehookdeny

Hook script: shell profile write

Hook script writes to a shell profile startup file

Public lane
threat-review
Category
security
Provider
lintai-ai-security
Scope
per-file
Surface
hook
Tier
stable
Severity
deny
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

Matches explicit shell startup profile modification in executable hook lines.

Deterministic signal basis

HookSignals redirection-or-tee detection over `.bashrc`, `.bash_profile`, `.zshrc`, or `.profile` targets in non-comment hook lines.

Malicious corpus
hook-persistence-escalation
Benign corpus
cursor-plugin-clean-basic
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

Writing to .bashrc, .zshrc, .profile, or .bash_profile is a persistence mechanism. A hook that edits shell startup files can survive beyond the repository workflow and alter later shells.

What Triggers

SEC635 matches executable hook lines that write to shell startup files through redirection or tee, such as >> ~/.bashrc or tee -a ~/.zshrc.

False Positives

There are legitimate dotfile-management repos, but in a shared AI-executable hook this behavior still deserves review because it changes host startup state outside the project tree.

Remediation

Remove the startup-file write. Store state in a repo-local file or use an explicit installation step outside the hook if host shell configuration is truly required.