T08 · Insecure Dependencies
- Location
SKILL.md:82- Finding
Unpinned Global Installation of a Third-Party CLI in Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:82
Vulnerability Type: Unpinned globally installed dependency
Risk Level: MediumComplete Code Snippet:
bash npm install -g @wenyan-md/cliTechnical Analysis
The skill instructs users or agents to install
@wenyan-md/cliglobally without specifying an exact version or verifying package integrity. Consequently, the installed implementation depends on whichever release the npm registry resolves at execution time, rather than the version reviewed when this skill was published.A global npm installation may execute package lifecycle scripts and makes the resulting executable available system-wide for the current environment. This does not prove that the named package is malicious, but it creates a mutable supply-chain trust boundary: compromise of the package, maintainer account, registry distribution path, or a future release could introduce code that is not represented in the audited project.
Attack Path
- An attacker compromises the package publication process or publishes a malicious future release.
- A user or agent follows the skill instruction after that release becomes current.
- npm resolves and globally installs the compromised version.
- Malicious lifecycle code can execute during installation, or malicious CLI code can execute when
wenyanis invoked. - The code can act with the privileges of the user running npm and potentially access local article files, environment data, and WeChat credentials available to that account.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the installing user's privileges. The affected scope may include files readable or writable by that user, publishing credentials accessible in the environment or CLI configuration, generated content, and the integrity of subsequent publishing operations. Administrative privileges are not inherently obtained unless the in ...[truncated 50 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed exact version, such as
@wenyan-md/cli@X.Y.Z. - Prefer a project-local, lockfile-controlled installation over a global installation.
- Commit and review the relevant lockfile, and use deterministic installation commands such as
npm ci. - Verify npm provenance, publisher identity, release signatures where supported, and expected package integrity before installation.
- Disable or separately review lifecycle scripts when operationally feasible.
- Run the publishing tool in a restricted environment with access only to the required article assets and credentials.
- Establish an explicit dependency-update review process before changing the pinned version.
- Pin the CLI to a reviewed exact version, such as
