Skip to content

Rule Reference

SEC320lintai-ai-securitycompatqualitystableserver_jsonwarn

server.json remotes: undefined template variable

server.json remotes URL references an undefined template variable

Public lane
compat
Category
quality
Provider
lintai-ai-security
Scope
per-file
Surface
server_json
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message only
How to read this lane

Config, schema, and policy contract review.

How to read this category

Contract, schema, or config correctness signal.

Activation Model

Preset Activation

These presets explain where this rule appears in the product experience.

Lifecycle

Stable Lifecycle Contract

State

stable

Graduation rationale

Checks server.json remotes[] URL templates for placeholder/variables contract mismatches 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.