T08 · Insecure Dependencies
Warning
- Location
- skill.json:25
- Finding
- Unpinned npm Package Is Automatically Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `skill.json:25-31`; also documented in `README.md:18-29` **Vulnerability Type**: Unpinned runtime dependency execution **Risk Level**: Medium ### Vulnerable Code `skill.json:25-31`: ```json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ], ``` Corresponding installation configuration in `README.md:18-29`: ```json { "mcpServers": { "uplo-customer-success": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key", "DEFAULT_PACKS": "customer_success" } } } } ``` ### Technical Analysis The Skill starts its MCP server using `npx -y @agentdocs1/mcp-server --http`. No exact package version, package integrity hash, lockfile, or locally reviewed implementation is supplied. The `-y` option suppresses installation confirmation. If the package is not already available locally, `npx` may retrieve the package from the configured npm registry and immediately execute it. Because no version is pinned, the effective executable can change independently of the reviewed Skill artifact. This creates a supply-chain trust boundary: the package publisher, publishing credentials, npm registry configuration, and latest resolved package release can determine what code executes. The repository itself contains only configuration and documentation, so the behavior of the executed MCP server cannot be verified from the audited files. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, registry resolution path, or a future release of `@agentdocs1/mcp-server`. 2. The attacker publishes a modified package version under the same package name. 3. A user installs or starts the Skill using the provided configuration. 4. `npx -y` resolves and downloads the unpinned package without req ...[truncated 1160 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@agentdocs1/mcp-server` to a specific, reviewed version rather than relying on the latest registry resolution. 2. Commit a lockfile containing package integrity metadata and deploy using a deterministic installation mechanism such as `npm ci`. 3. Avoid runtime installation through `npx -y`. Install the reviewed dependency during a controlled build or deployment stage. 4. Verify package provenance using npm signatures, trusted publishing metadata, checksums, or an internal package registry. 5. Apply an explicit dependency-update review process, including source review, vulnerability scanning, and regression testing. 6. Run the MCP server in a sandbox or container with minimal filesystem and network privileges. 7. Supply a narrowly scoped, short-lived API token rather than a broadly privileged credential. 8. Restrict inherited environment variables so the MCP process receives only values strictly required for operation. 9. Document the package version, integrity value, publisher identity, and expected server behavior in the Skill package. ]]>
