T08 · Insecure Dependencies
- Location
SKILL.md:11- Finding
Unpinned Third-Party CLI Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 11–15
Vulnerability Type: Unpinned and mutable third-party dependencies
Risk Level: MediumComplete Code Snippet
bash ## Install ```bash npm install -g mineru-open-api # or via Go (macOS/Linux): go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@latestTechnical Analysis
The installation instructions retrieve third-party software without specifying an audited, immutable version, commit, checksum, or cryptographic signature. The Go command explicitly uses the mutable
@latestreference, while the npm command resolves the registry's current package version and installs it globally.Consequently, the code executed by users can change after this Skill has been reviewed. A malicious or compromised release, registry account, upstream repository, or transitive dependency could introduce arbitrary installation-time or runtime behavior. The project contains only
SKILL.md; it does not include the CLI implementation or a lockfile that would permit review of the effective dependency code.The global npm installation also increases exposure by making the executable broadly available in the user's environment. Depending on package behavior and local npm configuration, lifecycle scripts may execute during installation.
Attack Path
- An attacker compromises the
mineru-open-apipackage, its publisher account, upstream repository, release process, or a relevant dependency. - The attacker publishes a malicious version or modifies the version resolved through
@latest. - A user or agent follows the documented installation command.
- The package manager downloads the mutable, attacker-controlled release.
- Malicious installation hooks or CLI runtime code execute with the permissions of the installing user.
- The compromised CLI can access files supplied for document extraction, process environment data such as
MINERU_TOKEN, and any other resources avai ...[truncated 787 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the npm package to a specifically audited version rather than resolving the current registry release:
bash npm install -g mineru-open-api@<audited-version> - Pin the Go installation to an audited semantic version or immutable commit instead of
@latest:bash go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@<audited-version-or-commit> - Publish expected package checksums or signature-verification instructions and require verification before installation.
- Record the reviewed package version and provenance in
SKILL.md. - Prefer a project-local or isolated installation over a global installation to reduce environmental exposure.
- Audit the pinned CLI release, its installation hooks, and its transitive dependencies.
- Run document processing with least privilege in a sandbox or container, exposing only the required input and output paths.
- Provide
MINERU_TOKENonly when required, avoid unnecessarily inherited environment variables, and document whether files or extracted content are transmitted to external services.
- Pin the npm package to a specifically audited version rather than resolving the current registry release:
