T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Global npm Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 15 **Vulnerability Type**: Supply-chain exposure through an unpinned third-party package **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g mineru-open-api ``` ### Technical Analysis The installation command retrieves the currently resolved version of `mineru-open-api` from the npm registry and installs it globally. No exact version, lockfile, integrity hash, or provenance verification is provided. Consequently, the code installed by users can differ from the version that was available when the skill was audited. npm packages can define lifecycle scripts that run during installation. If the package publisher, npm account, or package distribution channel is compromised, a malicious release could execute code during installation with the permissions of the invoking user. A globally installed package can also replace the corresponding command available in the user's executable search path. ### Attack Path 1. An attacker compromises the npm package publisher, publication credentials, or distribution process. 2. The attacker publishes a malicious release under the legitimate `mineru-open-api` package name. 3. A user follows the documented unpinned installation command. 4. npm resolves the package to the compromised release. 5. Malicious lifecycle code may run during installation, or malicious behavior may execute when the installed CLI is invoked. ### Impact Assessment Successful exploitation could execute arbitrary code with the permissions of the user running npm. This may permit access to files, environment variables, credentials available to that user, and documents subsequently supplied to the CLI. The global installation also makes the compromised executable available to later shell sessions. No evidence indicates that the reviewed skill itself contains such a payload; the risk arises from mutable upstream dependency resolution.
- Remediation
- ## Remediation Suggestions - Pin `mineru-open-api` to a reviewed exact version rather than allowing npm to select the current release. - Publish and verify the expected package integrity digest and package provenance. - Use a project-local installation with a committed lockfile instead of a global installation where practical. - Document the canonical npm package owner and registry source to reduce dependency-confusion and impersonation risks. - Review lifecycle scripts and package contents before recommending an updated version. - Run the conversion tool with least privilege and avoid exposing unrelated credentials or sensitive directories to it.
