T08 · Insecure Dependencies
- Location
SKILL.md:47- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 47
Vulnerability Type: Unpinned and unverified third-party dependency installation
Risk Level: MediumVulnerable Code
bash npm install -g unkeyThe installation guidance also suggests downloading a platform binary from GitHub Releases at line 50 without specifying an exact repository, version, checksum, or signature-verification procedure.
Technical Analysis
The skill instructs users or agents to install the latest available
unkeypackage globally from the npm registry. It does not pin a reviewed version or require verification of package provenance and integrity. A global installation can execute package lifecycle scripts and places executable files in the user's global npm environment.Consequently, the effective code installed by this instruction may change after the skill has been audited. A compromised npm account, malicious package release, registry compromise, or incorrect package resolution could cause attacker-controlled code to be installed. The alternative GitHub Releases guidance has a similar verification weakness because it does not identify the exact official repository or require signature or checksum validation.
Attack Path
- An attacker compromises the relevant package-publishing account or release channel, or otherwise causes a malicious version to be resolved under the referenced package name.
- A user or agent follows the skill's installation instruction without selecting a previously reviewed version.
- npm downloads and globally installs the attacker-controlled release.
- Malicious lifecycle scripts may execute during installation, or malicious behavior may execute when the installed
unkeycommand is invoked. - The malicious process operates with the privileges of the user performing the installation and may access resources available to that account, potentially including Unkey credentials used during ...[truncated 755 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically reviewed release, for example:
bash npm install -g unkey@<reviewed-version> - Record the approved version in the skill and establish a controlled process for reviewing and updating it.
- Identify the exact official npm package scope and official GitHub repository rather than referring generically to GitHub Releases.
- Publish and verify cryptographic checksums or signatures for downloaded binaries before execution.
- Where supported, validate npm package integrity through a lockfile or trusted package manifest and use a trusted registry configuration.
- Avoid elevated privileges during installation and execution. Prefer an isolated environment or temporary package runner with an explicitly pinned version when practical.
- Review package lifecycle scripts and consider disabling them during installation when they are unnecessary and compatibility has been verified.
- Document removal and credential-rotation procedures for cases where a downloaded release is later determined to be compromised.
- Pin the CLI to a specifically reviewed release, for example:
