T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15–17 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g mineru-open-api # or via Go (macOS/Linux): go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@latest ``` The metadata on line 5 also declares the npm package without an immutable version: ```yaml "package": "mineru-open-api" ``` ### Technical Analysis Both documented installation methods retrieve mutable third-party executable code. The npm command does not specify a version and installs the package globally, while the Go command explicitly selects `@latest`. The project supplies no checksum, cryptographic signature, lockfile, immutable commit reference, or other mechanism for verifying the downloaded artifact. This does not establish that the current upstream packages are malicious. However, it means the code installed by users can change after this Skill has been reviewed. If the package registry, upstream repository, maintainer account, or a transitive dependency is compromised, following these instructions could install attacker-controlled code. For npm, malicious lifecycle scripts may execute during installation. A malicious CLI can also execute when subsequently invoked. For Go, an attacker-controlled release or dependency can become part of the compiled executable and run when the resulting CLI is invoked. ### Attack Path 1. An attacker compromises the npm package, upstream Go repository, maintainer account, release process, or a transitive dependency. 2. The attacker publishes a malicious version that becomes the registry default or the version resolved by `@latest`. 3. A user or automated agent follows the installation instructions in `SKILL.md`. 4. The mutable dependency resolves to the attacker-controlled release. 5. For npm, malicious installation lifecycle behavior may run during the global installation. Otherwise, the malici ...[truncated 894 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the npm dependency to an exact reviewed version, for example: ```bash npm install --global mineru-open-api@<reviewed-version> ``` 2. Replace the Go `@latest` reference with an exact reviewed semantic version or immutable commit: ```bash go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@<reviewed-version-or-commit> ``` 3. Apply the same version pinning to the package declaration in the Skill metadata. 4. Publish expected checksums or signature-verification instructions for approved release artifacts. 5. Prefer a project-local npm installation with a lockfile over a global installation where practical. 6. Review dependency ownership, release provenance, transitive dependencies, and npm lifecycle scripts before approving a version. 7. Run the CLI under a least-privileged account and provide it only the documents and environment variables required for the task. 8. Upgrade versions through an explicit review process rather than automatically tracking the latest release. ]]>
