T08 · Insecure Dependencies
Error
- Location
- SKILL.md:57
- Finding
- Unpinned Installation and Execution of a Third-Party CLI Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 57-63; related upgrade instruction at lines 84-88 **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: High ### Evidence ```bash npm i -g @iqinghu/qhkit ``` The instructions also permit execution through an unpinned package reference: ```bash npx @iqinghu/qhkit <command> ... ``` The related upgrade procedure explicitly selects the newest available release: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill requires installation and execution of the third-party `@iqinghu/qhkit` npm package, but it does not pin the package to a reviewed version or verify package integrity against an independently maintained digest. Both the default npm installation and the documented mirror fallback resolve package contents at installation time. The use of `npx` has the same underlying risk because it can download and execute the package dynamically. The `@latest` upgrade instruction expressly permits package contents to change after this Skill has been audited. The package source is not included in the reviewed project. Consequently, this audit cannot verify its lifecycle scripts, local file access, token handling, media-upload behavior, API endpoints, or other runtime actions. An npm package may execute code during installation through lifecycle hooks and later when its CLI is invoked. Global installation also exceeds the minimum practical scope required for an individual video-generation task. It modifies the user's global Node.js tool environment rather than using a project-local, isolated dependency. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, configured npm registry, or mirror serving `@iqinghu/qhkit`. 2. The attacker publishes a malicious version under the existing package name or causes the mutable `latest` tag to resolve to a malicious release. 3. The Agent follows the Skill's bootstrap or upgrade ...[truncated 1420 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific version that has been reviewed: ```bash npm install --save-exact @iqinghu/qhkit@X.Y.Z ``` 2. Record and validate the expected package integrity value using a lockfile or a separately maintained SHA-512 digest. 3. Remove the use of `@latest` and do not upgrade automatically. Require a new security review before changing the permitted version. 4. Avoid global installation. Install the package in a dedicated, minimally privileged project directory or isolated container. 5. Avoid `npx` with an unpinned package. If it must be used, specify an exact reviewed version. 6. Disable npm lifecycle scripts where compatible: ```bash npm install --ignore-scripts --save-exact @iqinghu/qhkit@X.Y.Z ``` 7. Use only a trusted registry configured by the operator. Do not silently switch registries or mirrors. 8. Obtain explicit user approval before installing executable dependencies, uploading local media, or submitting a paid generation job. 9. Run the CLI with restricted filesystem and network access and expose only the media files required for the current task. 10. Document where the token is stored, ensure restrictive file permissions, and pass a narrowly scoped or short-lived token when supported. ]]>
