SKY-D367 · Supply chain and agent configuration
MCP server launched without an exact version
An MCP server entry tells a coding agent which program to start, such as npx -y @modelcontextprotocol/server-github. Without an exact version, npx, uvx or docker run fetch whatever the registry serves at that moment. SKY-D367 reports committed MCP servers that are fetched this way.
- Languages
- MCP configuration files
- Quality gate
- Full scan: listed, not counted by the gate. Diff scan: counted toward the gate limits. A baseline scan counts it like a diff scan when the baseline's
rule_coveragelists it. - Finding type
- review
Why it matters
If the package's publisher account is taken over, the next release runs inside every developer's agent session with the tokens in its env. The postmark-mcp package shipped fifteen clean versions before one started copying every email it sent to an attacker.
What Skylos flags
{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } } }}What Skylos leaves alone
{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github@2025.4.8"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } }, "time": { "command": "uvx", "args": ["mcp-server-time==0.6.2"] }, "docs": { "type": "http", "url": "https://mcp.example.com/mcp" } }}Why Skylos leaves it alone
Both launched servers name an exact version, so each start fetches the same release. The docs server is a remote URL: there is no local command to fetch, so this rule does not look at it.
How Skylos decides
- Runs with
--danger(and-a). Theca9library reads themcpServersorserversblock of.mcp.json,.cursor/mcp.json,.vscode/mcp.json,.kiro/settings/mcp.json, and themcp.jsonof.roo,.amazonqand.windsurf; the same blocks in.claude/settings.json,.claude/settings.local.jsonand.gemini/settings.json; themcpblock of.vscode/settings.json; and[mcp_servers.*]in.codex/config.toml. Dependency folders such asnode_modulesare skipped. - Builds the launch from
commandplusargs. A server with only aurlis not checked. It looks throughcmd /c,sh -candenvwrappers to the launcher:npx,pnpx,bunx,npm exec,pnpm dlx,yarn dlx,bun x,uvx,uv tool run,pipx run,docker run,podman runordeno run. - Reports the server when its launcher fetches the package and the version is not exact. Exact means
pkg@1.2.3for npm,pkg==1.2.3orpkg@1.2.3for PyPI, a full 40-character Git commit, or an image digest (@sha256:…).@latest, ranges and image tags such as:1.4.0are not exact. Local scripts,node server.jsandpython -mdo not fetch and are not reported. - Reports on the line of the server's name. Keeps the same files as SKY-D365 (regular files in the scanned folder that Git lists, or every file outside Git).
- In the gate, a full scan lists the finding without counting it; a diff scan counts a new one under the security limits. A finding is new when its rule, file and a digest of the server name and command are not among the merge base's findings.
How to fix it
Pin an exact, reviewed version and update it on purpose, the way you update a dependency. For Docker, pin the image digest.
{ "mcpServers": { "github": { "command": "npx",Removed: "args": ["-y", "@modelcontextprotocol/server-github"],Added: "args": ["-y", "@modelcontextprotocol/server-github@2025.4.8"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } } }}When it can be wrong
- A version fixed somewhere else, such as a global install or a lockfile the launcher never reads, does not count: only the launch line is read.
- An image tag is reported even when your registry makes tags immutable. An unscoped npm name with a slash, such as
npx owner/tool, is read as a GitHub shortcut and is pinned only by#<commit>.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Skylos reads no inline marker for this rule, even where the file allows comments.
Accept a reviewed server with a baseline:
skylos baseline ., then--baseline. The entry matches the rule, file, server name and command, not the line. In pull-request CI (SKYLOS_POLICY_BASE), the entry must also be in the base commit's.skylos/baseline.json.[tool.skylos] ignore = ["SKY-D367"]turns the rule off for the whole project.