T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned Third-Party Package Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20 and 86
Vulnerability Type: Unpinned global npm dependency
Risk Level: MediumVulnerable code at line 20:
bash npm install -g @tencent-ai/codebuddy-codeRepeated update command at line 86:
bash npm install -g @tencent-ai/codebuddy-codeTechnical Analysis
The installation and update instructions retrieve the latest available version of
@tencent-ai/codebuddy-codewithout pinning a reviewed version or verifying package integrity or provenance. npm packages can execute lifecycle scripts during installation, and the installed CLI subsequently executes with the privileges of the invoking user.The global
-ginstallation increases the exposure beyond a single project. If the package, publisher account, registry resolution, or a future release is compromised, following either command could install and execute attacker-controlled code. No malicious behavior in the named package itself was established by this audit; the vulnerability is the unsafe, mutable dependency installation procedure.Attack Path
- An attacker compromises the npm package, its publisher account, or a future release in its distribution channel.
- The attacker publishes a malicious version under the same package name.
- A user follows the documented installation or update command.
- npm resolves the unpinned package name to the attacker-controlled latest version.
- Malicious lifecycle scripts or CLI code execute under the user's account.
- The code can access or modify resources available to that account.
Impact Assessment
Successful exploitation provides code execution with the invoking user's operating-system privileges. The potential scope includes user-readable source code, credentials available in the environment, writable project files, user configuration, and other resources accessible to the account. A privileged installation ...[truncated 100 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin installation instructions to a specifically reviewed package version.
- Verify the expected npm registry, package publisher, provenance attestations, and release integrity before installation.
- Prefer a project-local dependency with a committed lockfile over a global installation where feasible.
- Use npm security controls that restrict lifecycle scripts when they are not required.
- Test upgrades in an isolated environment before recommending them to users.
- Document a controlled upgrade process instead of automatically retrieving the latest release.
- Warn users not to run npm installation commands with elevated operating-system privileges.
