Skip to content

Rule Reference

SEC640lintai-ai-securitystablejsonwarn

MCP config: authorized_keys write

MCP configuration command writes to SSH authorized_keys

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 SSH `authorized_keys`.

Deterministic signal basis

JsonSignals command-plus-args analysis over ArtifactKind::McpConfig using redirection-or-tee targeting of `authorized_keys`.

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 command that modifies authorized_keys can grant persistent SSH access to the host.

What Triggers

SEC640 matches MCP command definitions that write to an authorized_keys target, including redirection in a command string or structured tee invocations aimed at an authorized_keys path.

False Positives

Provisioning systems sometimes manage SSH keys intentionally, but shared MCP launch config should not silently change host login access.

Remediation

Remove the authorized_keys modification from the MCP config. Handle SSH key management in a dedicated reviewed provisioning path instead.