T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5
Vulnerability Type: Supply-chain exposure through an unpinned npm dependency
Risk Level: MediumVulnerable Code Snippet:
yaml compatibility: "Requires the settlemesh CLI (npm i -g settlemesh) and a SETTLE_API_KEY; makes authenticated, metered calls to the SettleMesh platform over the network."Technical Analysis
The Skill recommends installing
settlemeshdirectly from npm using a global installation command without specifying a reviewed version or package-integrity value. Consequently, the installed implementation is determined by whichever release the npm registry resolves as current at installation time.npm packages can execute lifecycle scripts during installation. If the package, its publisher account, the registry resolution process, or a transitive dependency is compromised, installation could execute attacker-controlled code with the privileges of the invoking user. A global installation also increases the affected scope by placing package files or executable shims in a shared installation prefix.
The Skill subsequently requires access to
SETTLE_API_KEYand cached authentication state. A malicious CLI release could therefore access credentials when invoked, alter deployment content, manipulate pricing operations, or transmit local information externally.Attack Path
- An attacker compromises the npm package, a maintainer account, or one of the package's dependencies.
- The attacker publishes a malicious release or causes dependency resolution to retrieve a malicious component.
- A user follows the documented
npm i -g settlemeshinstruction without a version or integrity constraint. - Malicious lifecycle code executes during installation, or malicious code runs when the CLI is later invoked.
- The code accesses data available to the invoking account, potentially including
SETTLE_API_KEY, cached SettleMesh session data, ...[truncated 898 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an explicitly reviewed version, such as
settlemesh@x.y.z, instead of resolving the latest release. - Record and verify package integrity metadata through a lockfile or an equivalent cryptographic verification mechanism.
- Identify the authoritative npm package and official source repository so users can verify publisher ownership.
- Prefer a project-local installation over
npm install -gto reduce the installation scope. - Review the package and its dependency tree before upgrades.
- Disable npm lifecycle scripts during installation where operationally feasible, and enable only scripts that have been reviewed.
- Run the CLI in a minimally privileged environment with access only to the files and credentials necessary for the requested deployment.
- Do not expose
SETTLE_API_KEYto package installation processes; inject it only when an authenticated operation is actually performed. - Rotate the API key and invalidate cached sessions if package compromise is suspected.
- Pin the CLI to an explicitly reviewed version, such as
