Skip to content

Rule Reference

SEC639lintai-ai-securitystablejsonwarn

MCP config: shell profile write

MCP configuration 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 MCP launch paths for explicit writes to shell startup profile files.

Deterministic signal basis

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

Malicious corpus
mcp-command-persistence-escalation
Benign corpus
mcp-safe-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

An MCP launcher that edits shell startup files can establish persistence outside the repository and affect future terminal sessions.

What Triggers

SEC639 matches MCP command definitions that write to .bashrc, .bash_profile, .zshrc, or .profile, either through redirection in a command string or through tee plus a matching target path in structured args.

False Positives

Dotfile-management systems are the main exception, but shared MCP launch config is generally the wrong place to mutate host startup files.

Remediation

Remove the startup-file write from the MCP config. Prefer repo-local state or an explicit, separately reviewed install step for host shell configuration.