T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 15
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
markdown - `diff4` must be installed and available on PATH. Use `npm i -g @diff4/cli` to install.Technical Analysis
The documented installation command retrieves the current version of
@diff4/clifrom the npm registry without pinning an audited version or verifying package integrity. The-goption installs the package globally and may execute npm lifecycle scripts during installation.Because the CLI implementation is not included in this project, its encryption, file-handling, and network behavior cannot be verified from the audited artifact. The effective code can also change after this Skill has been reviewed if a new package version is published.
This creates a software supply-chain risk. If the npm package, a maintainer account, or a newly published release is compromised, following the documented prerequisite may install and execute attacker-controlled code.
Attack Path
- An attacker compromises the package publisher, npm account, package distribution process, or a future package release.
- The attacker publishes a malicious version under the existing
@diff4/clipackage name. - A user or Agent follows the Skill instruction and runs
npm i -g @diff4/cli. - npm downloads the latest malicious release because no exact version or integrity value is specified.
- Malicious lifecycle scripts may execute during installation, or malicious behavior may execute when the Agent later invokes
diff4. - The compromised CLI can access data available to the installing user, including source files passed to it, environment variables, Git content, and network resources.
Impact Assessment
Successful exploitation would execute code with the privileges of the user running npm or the CLI. The potential scope includ ...[truncated 471 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specifically audited version, such as
@diff4/cli@x.y.z. - Verify the package against an expected integrity hash or trusted signed release.
- Avoid global installation. Prefer a project-local, lockfile-controlled dependency or a verified standalone binary.
- Disable npm lifecycle scripts during installation when they are not required.
- Document the canonical package source, publisher identity, and release-verification process.
- Review the CLI source and network behavior before instructing an Agent to provide it with sensitive files.
- Run the CLI in a restricted environment with only the minimum filesystem and network access required.
- Pin the CLI to a specifically audited version, such as
