T08 · Insecure Dependencies
- Location
SKILL.md:231- Finding
Unpinned Global CLI Installation Creates a Supply-Chain Code Execution Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:231-234
Vulnerability Type: Unpinned third-party package installed globally
Risk Level: MediumVulnerable Code
bash npm install -g @larksuite/cli lark-cli config initTechnical Analysis
The installation instructions retrieve the latest available version of
@larksuite/clifrom the user's configured npm registry and install it globally. No exact version, lockfile, or package-integrity verification is specified.npm packages may execute lifecycle scripts during installation. A compromised maintainer account, registry response, package release, or registry configuration could therefore cause arbitrary code to execute with the privileges of the user running the installation. Global installation also exposes the package beyond this Skill's project directory and is not necessary for the declared reaction functionality because the repository already includes a direct HTTPS implementation.
This finding does not indicate that the named package is currently malicious. It identifies an unsafe, mutable dependency acquisition process.
Attack Path
- An attacker compromises the upstream package, a maintainer account, or the npm registry path used by the victim.
- The attacker publishes or serves a malicious release under the expected package name.
- A user follows the Skill instructions and runs
npm install -g @larksuite/cli. - npm downloads the mutable latest release and may execute malicious lifecycle scripts.
- The installed CLI is subsequently invoked through
lark-cli config init, providing another opportunity for attacker-controlled code to run. - The payload executes as the installing user and may access files, environment variables, network resources, and user-level configuration available to that account.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the current user's privileges. Th ...[truncated 355 chars]
- Remediation
View remediation
Remediation Suggestions
- Avoid global installation and prefer a project-local dependency.
- Pin the dependency to an exact, reviewed version rather than accepting the latest release.
- Declare the dependency in
package.jsonand commit a lockfile with integrity hashes. - In documented workflows, use
npm ciagainst the committed lockfile. - Verify that the configured registry is the expected trusted registry before installation.
- Review package provenance, signatures, published contents, and lifecycle scripts before approving upgrades.
- Prefer the included direct Feishu API implementation when a separate CLI is unnecessary.
- If the CLI remains optional, clearly warn users that installation executes third-party code with their account privileges.
