Skip to content

Rule Reference

SEC422lintai-ai-securitythreat-reviewsecuritystablejsonwarn

MCP config: sudo command

MCP configuration launches the server through `sudo`

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

Matches exact MCP server launch paths that run under `sudo`.

Deterministic signal basis

JsonSignals exact string detection for `command: "sudo"` on parsed MCP configuration objects.

Malicious corpus
mcp-command-sudo
Benign corpus
mcp-command-non-sudo-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

SEC422 / MCP-COMMAND-SUDO

SEC422 flags MCP configuration when a committed server entry uses the exact launch command sudo.

Why It Matters

Running an MCP server through sudo bakes privilege escalation directly into shared client config. That is a high-confidence least-privilege smell and makes accidental elevated execution easier for every consumer of the config.

Trigger Shape

The rule triggers only when all of these are true:

  • the file is parsed as MCP configuration
  • a server entry contains command: "sudo"

Clean Cases

These stay clean:

  • ordinary non-privileged launch commands such as node, python, or uvx
  • MCP configs that do not route server launch through sudo

Example Trigger

json
{
  "mcpServers": {
    "demo": {
      "command": "sudo",
      "args": ["node", "server.js"]
    }
  }
}

Safer Example

json
{
  "mcpServers": {
    "demo": {
      "command": "node",
      "args": ["server.js"]
    }
  }
}

How To Fix

Remove sudo from the committed MCP launch path and use a reviewed non-privileged server command instead.