T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Execution of an Unverified Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md:4, 51-57`; `SKILL-cn.md:4, 51-57` **Vulnerability Type**: Third-party supply-chain exposure **Risk Level**: Medium ### Vulnerable Code `SKILL.md:4` and `SKILL-cn.md:4`: ```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"]}} ``` `SKILL.md:51-57`: ```markdown You can install on demand without persisting a global binary by running: ```bash npx @dlazy/cli@1.2.3 <command> ``` 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`). ``` `SKILL-cn.md:51-57` contains the equivalent installation instructions: ```markdown 如果你不希望在系统上长期保留一个全局 CLI,可以按需运行: ```bash npx @dlazy/cli@1.2.3 <command> ``` 如选择全局安装,技能的 `metadata.clawdbot.install` 字段已固定到 `npm install -g @dlazy/cli@1.2.3`。 ``` ### Technical Analysis The Skill directs the agent to retrieve and execute `@dlazy/cli` from the npm registry. The package is pinned to version `1.2.3`, which limits version drift but does not provide cryptographic verification of the downloaded artifact or establish that the npm release corresponds to the linked source repository. Both `npx` and global npm installation can execute package code under the invoking user's privileges. npm installation may also execute package lifecycle scripts unless those scripts are explicitly disabled. The executable package source is not included in the audited project, so its implementation and effective behavior could not be verified during this audit. This r ...[truncated 1825 chars]
- Remediation
- ## Remediation Suggestions 1. Vendor the required CLI source or distributable into a controlled, auditable release process rather than executing code directly from the public npm registry. 2. Verify downloaded artifacts against an independently published cryptographic digest or signed provenance before execution. 3. Confirm that the npm artifact corresponds exactly to the reviewed source commit by using reproducible builds and package provenance attestations. 4. Generate and retain a dependency lockfile and audit all transitive dependencies used by the CLI. 5. Where installation permits, suppress npm lifecycle scripts with `--ignore-scripts` and invoke only explicitly reviewed entry points. 6. Prefer a temporary, isolated execution environment with restricted filesystem access and an outbound-network allowlist limited to required endpoints. 7. Provide the API key only to the specific process that requires it and avoid exposing unrelated credentials through inherited environment variables. 8. Avoid privileged or administrator-level npm installation. If a global installation is necessary, perform it through a controlled package-management process. 9. Continuously monitor the publisher account, package integrity, release provenance, and dependency advisories for `@dlazy/cli`.
