T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:13
- Finding
- Unreviewed Third-Party npm CLI Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 13–14 **Vulnerability Type**: Third-party supply-chain exposure through an unaudited npm package **Risk Level**: Medium ### Vulnerable Code ```yaml 'install': 'npm install -g @dlazy/cli@1.2.3', 'installAlternative': 'npx @dlazy/cli@1.2.3', ``` ### Technical Analysis The Skill directs the environment to download and execute the third-party package `@dlazy/cli` from the npm registry. Although the package version is pinned to `1.2.3`, the audited project does not contain the package's source code, an npm lockfile, a verified integrity hash, a signed provenance record, or a vendored copy that would allow its effective behavior to be reviewed. The global installation option can execute npm lifecycle scripts during installation and leaves the CLI available in the user's environment after the Skill run. The `npx` alternative also downloads and runs code that is outside the reviewed project boundary. This is a supply-chain trust issue rather than evidence that the named package is currently malicious. Exploitation depends on compromise of the package, its publisher account, the registry delivery path, or another dependency included by the package. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a transitive dependency delivered with the referenced release. 2. A user or agent loads the Skill and follows its installation metadata. 3. The environment runs either `npm install -g @dlazy/cli@1.2.3` or `npx @dlazy/cli@1.2.3`. 4. npm retrieves code that was not included in this audit. 5. Malicious lifecycle or runtime code executes with the permissions of the invoking user. 6. The code could access files and environment variables available to that user, including media supplied to the CLI and potentially the configured dLazy API credential. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user runn ...[truncated 627 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Vendor the exact CLI source or executable artifact into a reviewable, version-controlled release process. 2. Commit an npm lockfile and verify package integrity using the registry-provided SHA-512 integrity value. 3. Require signed package provenance and verify the publisher and release workflow before installation. 4. Prefer a project-local installation over `npm install -g` to limit persistent changes to the user's environment. 5. Disable npm lifecycle scripts where they are unnecessary, for example by using `npm install --ignore-scripts` after confirming that the package does not legitimately require them. 6. Execute the CLI in a sandbox or container with: - Read-only access to unrelated files. - Access only to explicitly selected media. - A restricted environment-variable set. - Network access limited to documented dLazy endpoints. - No administrative or root privileges. 7. Document and verify the package's transitive dependencies as part of the Skill release process. 8. Add automated dependency scanning and alerting for ownership changes, provenance failures, known vulnerabilities, and unexpected package-content changes. ]]>
