T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Third-Party CLI Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 18-21 **Vulnerability Type**: Unpinned executable dependency installation **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 ``` ### Technical Analysis The installation instructions retrieve and execute mutable third-party dependencies without pinning an exact, reviewed version or immutable commit. The npm command implicitly installs the package version currently associated with the registry's default distribution tag, while the Go command explicitly requests `@latest`. Consequently, the code installed by users can differ from the code reviewed when this skill was published. If the upstream package, maintainer account, package registry, repository, or release process is compromised, a malicious release could be distributed through these legitimate-looking commands. Installing the npm package globally also increases exposure by making the executable available throughout the user's environment. This finding does not establish that the current `mineru-open-api` package is malicious. The risk arises from trusting mutable, remotely maintained executable dependencies without version and integrity controls. ### Attack Path 1. An attacker compromises the upstream package, repository, maintainer credentials, or publishing workflow. 2. The attacker publishes a malicious version under the expected package identity or changes the release selected by `latest`. 3. A user follows the skill's documented installation command. 4. The package manager downloads and installs the attacker-controlled release. 5. Malicious code executes during package installation or when `mineru-open-api` is subsequently invoked. 6. The malicious process operates with the installing or invoking user's privileges and may access documents, environment variables, ...[truncated 675 chars]
- Remediation
- ## Remediation Suggestions - Pin the npm dependency to an exact, reviewed version rather than relying on the registry's default tag: ```bash npm install -g mineru-open-api@<reviewed-exact-version> ``` - Replace the Go `@latest` reference with a fixed semantic version or reviewed commit: ```bash go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@<reviewed-version> ``` - Verify package provenance, publisher identity, release signatures, checksums, and registry integrity before installation. - Document the expected package version and update it only after security review. - Prefer an isolated, least-privilege environment instead of a global installation. Avoid installing or executing the converter as an administrator or root user. - Restrict the converter's access to only the input and output directories required for the task. - Avoid exposing unrelated credentials to the process, and provide `MINERU_TOKEN` only for the duration of the conversion. - Where feasible, use dependency lockfiles, reproducible builds, artifact hashes, and automated supply-chain scanning.
