T08 · Insecure Dependencies
- Location
SKILL.md:175- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:175and repeated atSKILL.md:290
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
bash # Global installation npm install -g @dlazy/cli@latestThe dependency table repeats the same installation instruction:
markdown | @dlazy/cli | CLI tool | Required | `npm install -g @dlazy/cli@latest` |Technical Analysis
The Skill instructs users or agents to globally install the mutable
latestrelease of the third-party@dlazy/clinpm package. It does not pin an exact reviewed version or require verification against an expected integrity digest.Because the
latestnpm distribution tag can be changed after this Skill has been audited, the code eventually installed and executed may differ from the code that existed during review. Installation may also execute npm lifecycle scripts under the invoking user's account. Global installation increases exposure by placing the executable in a shared user or system command path.This finding does not establish that the current package is malicious. It identifies an unsafe dependency acquisition practice that creates a supply-chain attack opportunity.
Attack Path
- An attacker compromises the package publisher account, npm package, release process, or another relevant supply-chain component.
- The attacker publishes a malicious package version and assigns it to the
latestdistribution tag. - A user or agent follows the Skill and executes
npm install -g @dlazy/cli@latest. - npm resolves the mutable tag to the compromised version.
- Malicious lifecycle scripts may execute during installation, or malicious package logic executes when the
dlazycommand is invoked. - The payload operates with the permissions of the account that ran npm and may remain available through the globally installed executable.
Impact Assessment
Successful exploitation could allow arbitrary code ...[truncated 803 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace
@latestwith an exact, reviewed package version:bash npm install --global --ignore-scripts @dlazy/cli X.Y.Z -
Verify the selected release's provenance and integrity before recommending it. Record an expected package digest or lockfile integrity value in a trusted location.
-
Prefer a project-local installation over a global installation so that the dependency is isolated and represented in a lockfile:
bash npm install --save-exact --ignore-scripts @dlazy/cli@X.Y.Z -
Commit and enforce a lockfile, and use deterministic installation such as
npm ciwhere applicable. -
Disable npm lifecycle scripts with
--ignore-scriptsif the package does not strictly require them. If scripts are required, review them before installation. -
Execute the CLI in a restricted container or sandbox with:
- No elevated privileges.
- Access only to explicitly selected input and output files.
- Minimal environment variables.
- Restricted outbound network access.
-
Do not install the dependency using
sudoor an administrator account. -
Update both occurrences in
SKILL.mdso the quick-start instructions and dependency table consistently reference the same pinned, reviewed version. -
Establish a controlled dependency-update process that reviews new versions before changing the pin.
-
