T08 · Insecure Dependencies
- Location
SKILL.md:51- Finding
Unpinned Global CLI Installation from a Third-Party Registry
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 51
Vulnerability Type: Supply-chain exposure through an unpinned global dependency
Risk Level: HighVulnerable Code:
bash npm install -g @larksuite/cli --registry https://registry.npmmirror.comTechnical Analysis
The Skill instructs users to install the latest available version of
@larksuite/cliglobally fromregistry.npmmirror.com, rather than pinning a reviewed version from the official registry. No package version, integrity hash, signature, or provenance validation is specified.A global npm installation may execute package lifecycle scripts with the privileges of the invoking user. The effective code installed by this command can also change after the Skill has been audited because the version is not pinned. Consequently, compromise of the package, its dependencies, the configured registry, or a future package release could introduce arbitrary executable code.
Attack Path
- An attacker compromises the configured registry, the package publication account, or a transitive dependency.
- The attacker publishes or serves a modified version of
@larksuite/cli. - A user follows the Skill and executes the unpinned global installation command.
- Malicious package lifecycle code or CLI code executes with the user's npm permissions.
- The installed global command can subsequently access local files, authorization tokens, environment variables, or Feishu data made available during later steps.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the invoking user's account. Because the package is installed globally and later handles broad Feishu authorization, compromise could affect local user data, authentication tokens, Feishu business information, and subsequent
lark-clioperations. The exact system-level impact depends on the privileges used to run npm.- Remediation
View remediation
Remediation Suggestions
- Install from the official npm registry unless a separately verified and trusted internal mirror is required.
- Pin an exact, reviewed package version, for example
@larksuite/cli@X.Y.Z. - Verify package integrity, publisher identity, signatures, and provenance before installation.
- Review the selected package version and its transitive dependency tree.
- Prefer a project-local installation with a lockfile instead of a global installation.
- Disable lifecycle scripts during installation where compatible, and run the CLI in a sandbox or least-privileged environment.
- Establish a controlled update process rather than automatically resolving the newest available release.
