T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Global Installation of Authenticated Enterprise Messaging CLIs
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 25-37
Vulnerability Type: Unpinned third-party dependencies installed globally
Risk Level: MediumVulnerable Code
bash npm install -g @larksuite/cli && lark auth loginbash npm install -g dingtalk-workspace-cli && dws auth loginbash npm install -g @wecom/cli && wecom auth loginTechnical Analysis
The documented installation commands retrieve the latest versions of three npm packages rather than exact, reviewed versions. Although the skill describes minimum CLI versions, it does not enforce those versions with package specifiers, lockfiles, integrity hashes, or provenance verification.
Installing packages globally increases exposure because npm package installation and lifecycle scripts execute with the invoking user's privileges and can place executable files in a global command path. The instructions then immediately authenticate the installed tools against enterprise communication platforms. Consequently, a compromised or unexpectedly modified package release could access authentication material, intercept enterprise information, or perform actions through authenticated user sessions.
No evidence establishes that these packages are currently malicious. The issue is the unsafe and mutable dependency acquisition process.
Attack Path
- An attacker compromises a referenced npm package, its publisher account, or its release pipeline, or causes an unsafe replacement release to become the version resolved by npm.
- A user follows the skill instructions and runs an unpinned global installation command.
- npm downloads the attacker-controlled release and may execute its installation or lifecycle scripts with the user's local privileges.
- The malicious package installs or replaces a globally accessible CLI executable.
- The user runs the immediately following authentication command and grants the compromised CLI access to an en ...[truncated 1010 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to an exact reviewed version, such as
@larksuite/cli@1.0.40, rather than relying on the latest package release. - Prefer project-local installation over global installation so dependency versions and executable resolution remain isolated and reproducible.
- Maintain a lockfile and use a reproducible installation command such as
npm ciwhere the packaging model permits it. - Verify npm publisher identity, package provenance, release signatures, and registry source before installation.
- Validate package integrity using trusted checksums or lockfile integrity metadata obtained through a controlled review process.
- Disable npm lifecycle scripts with
--ignore-scriptswhen the reviewed CLIs do not require them. If scripts are required, inspect them before execution. - Run the CLIs under a dedicated, least-privileged operating-system account or isolated environment.
- Authenticate only after verifying the installed executable path, version, package contents, and cryptographic integrity.
- Grant each enterprise integration only the minimum scopes required for the selected workflow, and provide a documented process for revoking credentials.
- Periodically review pinned versions and upgrade them through a controlled security assessment rather than automatically resolving new releases.
- Pin every dependency to an exact reviewed version, such as
