T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 14
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
markdown - **依赖工具**:已安装 `wenyan-cli` (`pnpm add -g @wenyan-md/cli`)。Technical Analysis
The prerequisite recommends globally installing
@wenyan-md/cliwithout specifying a reviewed version or integrity constraint:bash pnpm add -g @wenyan-md/cliThis command resolves a mutable package version from the configured package registry. A future compromised or malicious release could execute package lifecycle scripts during installation or malicious logic when the CLI is invoked. The global installation also increases the exposure of the affected tool beyond this project.
The Skill later directs the Agent to run this CLI in a workflow that requires
WECHAT_APP_IDandWECHAT_APP_SECRET. If a malicious package version executes in the same environment, it could access environment variables and other files available to the invoking user.This finding identifies supply-chain exposure caused by unsafe dependency installation guidance. The audit did not establish that the current package is malicious.
Attack Path
- An attacker compromises the package, maintainer account, registry publication process, or another relevant supply-chain component.
- The attacker publishes a malicious version under the expected
@wenyan-md/clipackage name. - A user follows the documented unpinned global installation command.
pnpmresolves and installs the attacker-controlled release.- Malicious code executes through an installation lifecycle script or when the
wenyancommand is subsequently invoked. - The code operates with the privileges of the invoking user and may access credentials, project files, and globally writable user-level resources available in that execution environment.
Impact Assessment
Suc ...[truncated 607 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
@wenyan-md/clito a specific version that has been reviewed and tested. - Prefer a project-local dependency governed by a committed lockfile instead of a global installation.
- Verify package provenance and integrity through registry integrity metadata, checksums, signatures, or an approved internal package mirror.
- Review dependency changes before updating the pinned version.
- Disable package lifecycle scripts during installation where operationally feasible, and enable only reviewed scripts when required.
- Run the CLI under a dedicated, least-privileged account or isolated environment.
- Provide
WECHAT_APP_IDandWECHAT_APP_SECRETonly to the publication process that requires them, rather than exposing them throughout installation, rendering, or theme-registration operations. - Avoid elevated installation or execution. Document explicitly that the command must not be run as
rootor with equivalent administrative privileges.
- Pin
