T08 · Insecure Dependencies
Error
- Location
- SKILL.md:26
- Finding
- Unpinned npm Package Is Downloaded and Executed at Runtime## Vulnerability Details **File Location**: `SKILL.md`, lines 6 and 26-33 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```yaml metadata: {"openclaw":{"requires":{"env":["SOCIALDATAX_API_KEY"],"bins":["node","npm"]},"primaryEnv":"SOCIALDATAX_API_KEY","install":[{"kind":"node","package":"socialdatax-skills","bins":[]}],"emoji":"📌","homepage":"https://socialdatax.com/ai?from=clawhub"}} ``` ```bash npx -y socialdatax-skills@latest xhs search \ --keyword "<keyword>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-xhs-search npx -y socialdatax-skills@latest xhs search \ --keyword "<keyword>" --pages 3 --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-xhs-search ``` ### Technical Analysis The documented commands use `npx -y socialdatax-skills@latest`, causing npm to retrieve and immediately execute the version currently associated with the mutable `latest` tag. The `-y` option suppresses the normal installation confirmation. No exact version, lockfile, integrity hash, or package provenance requirement is specified. Consequently, the code that runs can change after the Skill has been reviewed. A compromised publisher account, npm package, release pipeline, or future package version could introduce arbitrary executable behavior without requiring any modification to `SKILL.md`. This network retrieval is necessary in some form for the declared API-backed search functionality, but downloading and executing a mutable package release is not the minimum-risk mechanism for providing it. ### Attack Path 1. An attacker compromises the `socialdatax-skills` npm publisher account, release process, or package distribution channel, or publishes a malicious future release through another supply-chain failure. 2. The malicious release is assigned the npm ...[truncated 1096 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `socialdatax-skills@latest` with an exact, reviewed package version, such as `socialdatax-skills@X.Y.Z`. 2. Use a lockfile and verified npm integrity metadata so the resolved artifact cannot change silently. 3. Remove `-y` where practical and require explicit authorization before the first dependency installation. 4. Prefer installing the reviewed dependency during controlled Skill deployment rather than downloading executable code on every invocation. 5. Verify package provenance through npm provenance attestations, signed releases, and a restricted trusted registry. 6. Run the CLI in a sandbox with access only to the required API key, network destination, and working data. 7. Prevent the child process from inheriting unrelated environment variables and filesystem permissions. 8. Establish a dependency review and update process so package upgrades are audited before the pinned version changes.
