T08 · Insecure Dependencies
- Location
SKILL.md:160- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 160-167
Vulnerability Type: Unpinned third-party package installed globally
Risk Level: MediumVulnerable Code
bash # Install if not already installed npm install -g miaoda-studio-cli # Verify installation miaoda-studio-cli --versionTechnical Analysis
The Skill instructs users to install
miaoda-studio-cliglobally from the npm registry without specifying a reviewed version, integrity hash, lockfile, or package provenance. Consequently, the installed code is determined by whichever package release the registry resolves at installation time and may differ from the version originally reviewed by the Skill author.npm installations may execute package lifecycle scripts, including pre-installation, installation, and post-installation scripts, with the privileges of the invoking user. The global installation option also places package files and executable entry points in the global Node.js environment, increasing their reach beyond the project directory.
No evidence in the reviewed project establishes that
miaoda-studio-cliis currently malicious. The issue is the unsafe and mutable dependency acquisition process, which creates a supply-chain exposure if the package, its maintainer account, the registry resolution process, or a transitive dependency is compromised.Attack Path
- An attacker compromises the referenced npm package, its publisher account, or one of its transitive dependencies.
- The attacker publishes a malicious release under the expected package name.
- A user follows the Skill instructions and runs
npm install -g miaoda-studio-cli. - npm resolves the unpinned package to the attacker-controlled release.
- Malicious package code may run through npm lifecycle scripts during installation or when the installed CLI is subsequently invoked.
- The payload operates with the invoking user’s privileges and can a ...[truncated 636 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specific reviewed version, such as
miaoda-studio-cli@X.Y.Z, rather than installing the latest mutable release. - Verify package provenance, publisher identity, release signatures where available, and the expected integrity digest before installation.
- Document the exact reviewed package version and its expected checksums.
- Prefer a project-local dependency managed through a committed lockfile instead of a global installation.
- Review both the direct package and its transitive dependency tree for suspicious lifecycle scripts and known vulnerabilities.
- Disable lifecycle scripts during installation with
--ignore-scriptswhen the package can operate without them. - Run the CLI in a restricted environment with minimum filesystem, credential, and network access.
- Document the CLI’s network destinations, transmitted data, generated files, and credential requirements so users can make an informed trust decision.
- Pin the dependency to a specific reviewed version, such as
