T08 · Insecure Dependencies
Error
- Location
- SKILL.md:66
- Finding
- Unpinned Third-Party Package Download and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 66-73 **Vulnerability Type**: Unpinned runtime dependency execution **Risk Level**: High ### Vulnerable Code ```json { "mcpServers": { "agntor": { "command": "npx", "args": ["-y", "@agntor/mcp"], "env": { "AGNTOR_API_KEY": "{AGNTOR_API_KEY}" } } } } ``` The frontmatter also declares the same package without an exact version: ```yaml metadata: {"openclaw": {"emoji": "🛡️", "homepage": "https://github.com/agntor/agntor", "requires": {"env": ["AGNTOR_API_KEY"]}, "primaryEnv": "AGNTOR_API_KEY", "install": [{"id": "npm", "kind": "node", "package": "@agntor/mcp", "bins": ["agntor-mcp-server"], "label": "Install Agntor MCP (npm)"}]}} ``` ### Technical Analysis The MCP configuration invokes `npx -y @agntor/mcp` without an exact package version or an integrity constraint. The `-y` option suppresses the interactive installation prompt, allowing npm to download and execute the package automatically. Consequently, the code reviewed during this audit is not necessarily the code that will execute later. A newly published, compromised, or otherwise unsafe package release could run with the privileges of the host agent process. The child process also receives `AGNTOR_API_KEY` through its environment. No evidence establishes that the package is currently malicious. The vulnerability is the unsafe supply-chain execution model, which permits the effective executable payload to change after review. ### Attack Path 1. An attacker compromises the npm publisher account, registry delivery path, package repository, or a package dependency. 2. The attacker publishes a malicious version that still satisfies the unversioned package reference. 3. The Skill starts the MCP server using `npx -y @agntor/mcp`. 4. npm retrieves the attacker-controlled release without requesting confirmation. 5. The package executes locall ...[truncated 891 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the unversioned package reference with an exact, audited version, such as `@agntor/mcp@X.Y.Z`. 2. Install dependencies during a controlled build or deployment phase rather than downloading executable code at runtime. 3. Commit and enforce a lockfile with integrity hashes. 4. Verify package provenance, signatures, publisher identity, and registry integrity before installation. 5. Remove `npx -y` so unexpected installation or version changes cannot proceed silently. 6. Run the MCP server in a restricted container or sandbox with minimal filesystem and network access. 7. Supply a narrowly scoped, short-lived API credential instead of a broadly privileged or long-lived key. 8. Prevent unnecessary environment variables and host credentials from being inherited by the package process. 9. Monitor dependency changes and repeat security review before upgrading the pinned version.
