T08 · Insecure Dependencies
- Location
skill.json:27- Finding
Automatic Execution of an Unpinned npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:27-36andREADME.md:20-22
Vulnerability Type: Unpinned third-party package installed and executed automatically
Risk Level: HighThe Skill launches an npm package using
npx -ywithout specifying an exact version, lockfile, checksum, or other integrity constraint.Vulnerable configuration in
skill.json:json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ], "env": { "AGENTDOCS_URL": "${config.agentdocs_url}", "API_KEY": "${config.api_key}", "DEFAULT_PACKS": "insurance" }, "transport": "http", "url": "${config.agentdocs_url}/mcp" }The same unsafe installation pattern is documented in
README.md:json "uplo-insurance": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key", "DEFAULT_PACKS": "insurance" } }Technical Analysis
npxcan retrieve a package from the configured npm registry when it is not already installed locally. The-yoption suppresses the interactive installation confirmation. Because@agentdocs1/mcp-serverhas no exact version constraint, the effective executable can change after the Skill has been reviewed.This creates a supply-chain trust boundary in which a future package release, compromised npm maintainer account, registry compromise, or malicious dependency introduced into the package can result in arbitrary code execution. The launched process is explicitly provided with
API_KEYandAGENTDOCS_URL, making those values accessible to any code executing inside the dependency.The audit did not establish that the current package is malicious. The confirmed weakness is the automatic execution of mutable, unpinned third-party code without an integrity-verification mechanism.
...[truncated 1805 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the unversioned package reference with an audited exact version, for example
@agentdocs1/mcp-server@X.Y.Z; do not use a range or floating tag. - Install the dependency during a controlled build step using a committed lockfile containing npm integrity metadata, rather than downloading it dynamically whenever the Skill runs.
- Use
npm ci --ignore-scriptswhere compatible, and explicitly review any installation scripts that must be enabled. - Remove
-yso unexpected package installation cannot occur without an explicit decision. Prefer launching a previously installed, verified local binary. - Verify package provenance, publisher identity, release signatures, and checksums before approving upgrades. Review transitive dependency changes for every update.
- Run the MCP server in a sandbox or container with a read-only filesystem, minimal outbound network access, no unnecessary host mounts, and a dedicated unprivileged account.
- Supply a narrowly scoped, short-lived API token that grants only the knowledge operations required by this Skill. Do not reuse administrative credentials.
- Prevent child processes and unrelated tools from inheriting the API key where feasible. Rotate the token immediately if dependency compromise is suspected.
- Update the installation example in
README.mdso users are not instructed to reproduce the unsafe unpinnednpx -ypattern.
- Replace the unversioned package reference with an audited exact version, for example
