T08 · Insecure Dependencies
Error
- Location
SKILL.md:28- Finding
Unpinned Third-Party Package Execution with Access to WeCom Credentials
- Content
View full analysis
", "WECOM_AGENT_ID": "<你的应用ID>", "WECOM_SECRET": "<你的应用密钥>" ``` ### Technical Analysis The configuration directs `npx` to retrieve and execute `wecom-mcp-server` without specifying an exact package version. The `-y` option suppresses confirmation prompts, allowing the package selected by the registry at execution time to run automatically. No lockfile, package integrity hash, verified source reference, or publisher-verification procedure is provided. Consequently, the effective executable can change after the Skill has been reviewed. A compromised package release, registry account, or dependency could introduce arbitrary code. The downloaded process receives `WECOM_CORP_ID`, `WECOM_AGENT_ID`, and `WECOM_SECRET` through its environment. Malicious package code could read and transmit these credentials while also operating with the filesystem, network, and process privileges of the OpenClaw user. ### Attack Path 1. An attacker compromises the `wecom-mcp-server` package, its publisher account, or a transitive dependency and publishes a malicious release. 2. A user follows the Skill instructions and configures the MCP server using the unversioned package name. 3. OpenClaw starts the server by executing `npx -y wecom-mcp-server`. 4. `npx` retrieves the currently resolved package release without interactive confirmation. 5. The malicious package executes with the privileges of the OpenClaw user. 6. The package reads the WeCom corporate identifier, application identifier, and application secret from its environment. 7. The attacker can exfiltrate those credentials or misuse the application's authorized WeCom capabilities. ### Impact Assessment Successful exploitati ...[truncated 680 chars]- Remediation
View remediation
"] ``` 2. Prefer installing the dependency during a controlled deployment process instead of downloading it whenever the MCP server starts. 3. Maintain and verify a lockfile and package integrity metadata. 4. Confirm that the package is distributed by the expected official publisher and review its source and transitive dependencies. 5. Use a trusted internal registry or approved package mirror where feasible. 6. Run the MCP server in a sandbox or container with restricted filesystem, process, and network access. 7. Create a least-privilege WeCom application that has only the API permissions required for intended operations. 8. Rotate the WeCom secret after any suspected package compromise and review relevant WeCom and Gateway logs for unauthorized activity. 9. Add dependency monitoring and require security review before upgrading the pinned package version. ]]>
