T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Execution of an Unbundled Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:5, 60-63` - `SKILL-cn.md:5, 60-63` **Vulnerability Type**: Third-party dependency and supply-chain execution risk **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md`: ```yaml metadata: {"clawdbot":{"emoji":"🤖","requires":{"bins":["npm","npx"]},"install":"npm install -g @dlazy/cli@1.2.3","installAlternative":"npx @dlazy/cli@1.2.3","homepage":"https://github.com/dlazy-ai/cli","source":"https://github.com/dlazy-ai/cli","author":"dlazyai","license":"see-repo","npm":"https://www.npmjs.com/package/@dlazy/cli","configLocation":"~/.dlazy/config.json","apiEndpoints":["api.dlazy.com","files.dlazy.com"]},"openclaw":{"systemPrompt":"When invoking this skill, use dlazy jimeng-omnihuman-1.5 -h for help."}} ``` ```bash npx @dlazy/cli@1.2.3 <command> ``` ```text Or, if you prefer a global install, the skill's `metadata.clawdbot.install` field declares the exact pinned version (`npm install -g @dlazy/cli@1.2.3`). Review the GitHub source before installing. ``` `SKILL-cn.md` contains the equivalent dependency declarations and commands: ```yaml metadata: {"clawdbot":{"emoji":"🤖","requires":{"bins":["npm","npx"]},"install":"npm install -g @dlazy/cli@1.2.3","installAlternative":"npx @dlazy/cli@1.2.3","homepage":"https://github.com/dlazy-ai/cli","source":"https://github.com/dlazy-ai/cli","author":"dlazyai","license":"see-repo","npm":"https://www.npmjs.com/package/@dlazy/cli","configLocation":"~/.dlazy/config.json","apiEndpoints":["api.dlazy.com","files.dlazy.com"]},"openclaw":{"systemPrompt":"当调用此技能时,可以使用 dlazy jimeng-omnihuman-1.5 -h 查看帮助信息。"}} ``` ```bash npx @dlazy/cli@1.2.3 <command> ``` ```text 如选择全局安装,技能的 `metadata.clawdbot.install` 字段已固定到 `npm install -g @dlazy/cli@1.2.3`。安装前建议先到 GitHub 仓库审阅源码。 ``` ### Technical Analysis The Skill relies on `@dlazy/cli@1.2.3`, but the implementation of that package is not included in the audited project. Both `npx` execution and global npm installation re ...[truncated 2606 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Vendor the exact CLI source or executable into a controlled build process and perform a security review before distribution. 2. Publish and verify a trusted cryptographic digest or signature for the exact package artifact, rather than relying only on a version pin. 3. Add a lockfile with integrity metadata and audit all transitive dependencies. 4. Use an approved registry with namespace controls and package provenance verification. 5. Disable npm lifecycle scripts where compatible, for example by installing with `--ignore-scripts`, and explicitly review any lifecycle behavior that is required. 6. Prefer an ephemeral, non-global installation over `npm install -g` to avoid leaving a persistent executable in the user's environment. 7. Run the CLI in a restricted sandbox or container with: - A dedicated unprivileged user. - Access only to explicitly selected input and output files. - A minimal environment that does not expose unrelated credentials. - Network access limited to documented service endpoints. 8. Store the API key using an operating-system credential manager where possible, and ensure it can be promptly rotated or revoked. 9. Document the package verification procedure and the exact reviewed source commit corresponding to version `1.2.3`. ]]>
