Skip to content

Rule Reference

SEC446lintai-ai-securitythreat-reviewsecuritystablejsonwarn

MCP config: sudo first argument

MCP configuration passes `sudo` as the first launch argument

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 pass `sudo` as the first argv element.

Deterministic signal basis

JsonSignals exact string detection for `args[0] == "sudo"` on parsed MCP configuration objects.

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

SEC446 / MCP-ARGS-SUDO

SEC446 flags MCP configuration when a committed server entry passes the exact first launch argument sudo.

Why It Matters

Passing sudo as the first argument still bakes privilege escalation directly into shared MCP client config, even when the top-level command field is not itself sudo.

Trigger Shape

The rule triggers only when all of these are true:

  • the file is parsed as MCP configuration
  • a server entry contains args[0] == "sudo"

Clean Cases

These stay clean:

  • non-privileged first arguments such as "server.js" or "--stdio"
  • configs where sudo appears later in the argument list but is not the launch prefix

Example Trigger

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

Safer Example

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

How To Fix

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