Skip to content

Rule Reference

SEC320lintai-ai-securitystableserver_jsonwarn

server.json remotes: undefined template variable

server.json remotes URL references an undefined template variable

Provider
lintai-ai-security
Surface
server_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 server.json remotes[] URL templates against variables defined on the same remote entry.

Deterministic signal basis

ServerJsonSignals placeholder extraction over remotes[] URLs compared with remotes[].variables keys.

Malicious corpus
server-json-unresolved-remote-variable
Benign corpus
server-json-remote-variable-defined
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

Undefined placeholders in server.json remote URLs break portability and can push registry consumers into runtime failures or ad hoc string substitution behavior.

What Triggers

SEC320 applies to server.json remotes[] URL templates and triggers when a placeholder in the URL is not defined under the same remote entry's variables object.

Example that triggers:

json
{
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://{tenant_id}.example.com/mcp"
    }
  ]
}

Example that stays clean:

json
{
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://{tenant_id}.example.com/mcp",
      "variables": {
        "tenant_id": { "description": "Tenant subdomain", "isSecret": false }
      }
    }
  ]
}

False Positives

This is a structural consistency check over parsed placeholders and variable keys. If the placeholder is genuinely meant to be provided elsewhere, the safer pattern is still to declare it explicitly under the same remote entry.

Remediation

Define every URL placeholder under remotes[].variables or remove the unresolved placeholder from the remote URL.