T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:23
- Finding
- Unpinned Packages Are Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:23-28` (also documented in `SKILL.md:34-35`, `SKILL.md:1421`, and `README.md:36-58`) **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml mcp_servers: - name: lark-mcp package: "@larksuiteoapi/lark-mcp" source: "https://github.com/larksuite/lark-openapi-mcp" description: "Official Feishu/Lark OpenAPI MCP server" command: "npx" args: ["-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "$LARK_APP_ID", "-s", "$LARK_APP_SECRET"] ``` Related installation instructions include: ```bash npm install -g @larksuiteoapi/lark-mcp npx -y @larksuiteoapi/lark-mcp mcp -a <APP_ID> -s <APP_SECRET> npm i -g clawhub ``` ### Technical Analysis The Skill invokes `npx -y` against a package without specifying an exact version. If the package is unavailable locally, `npx` can retrieve the currently resolved release from the package registry and execute it immediately. The `-y` option suppresses the normal confirmation prompt. The global installation commands are likewise not version-pinned. Consequently, the code executed during installation or startup can change after the Skill itself has been reviewed. The repository metadata identifies an apparently official Lark package, and there is no evidence that the current package is malicious. Nevertheless, the configuration does not bind execution to a reviewed artifact, version, or integrity digest. This creates a supply-chain exposure if the package registry account, upstream release pipeline, package namespace, or a transitive dependency is compromised. ### Attack Path 1. An attacker compromises the upstream package publisher, release pipeline, registry account, or a dependency included in a future package version. 2. The attacker publishes a malicious release under the expected package name. 3. A user installs or starts the Skill using the documented unpinned `npm` or `npx -y` command. ...[truncated 1111 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@larksuiteoapi/lark-mcp` and `clawhub` to exact, reviewed versions rather than floating latest releases. 2. Remove `-y` so that unexpected package retrieval is not silently approved. 3. Install dependencies through a lockfile-backed deployment process and verify package integrity hashes. 4. Prefer a preinstalled, reviewed executable instead of allowing Skill startup to fetch executable code dynamically. 5. Run the MCP server in a dedicated, unprivileged account or container with access only to required configuration and network destinations. 6. Establish a controlled update process that reviews release notes, source changes, provenance attestations, and dependency changes before upgrading. 7. Where supported, use package-manager provenance verification and an internal trusted registry mirror. ]]>
