T08 · Insecure Dependencies
- Location
SKILL.md:17- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 17–21
Vulnerability Type: Unpinned and unverifiable third-party dependency installation
Risk Level: MediumVulnerable Code
markdown ## Installation ```bash npm install -g beestat-clitext ### Technical Analysis The installation instructions globally install the latest version of `beestat-cli` without specifying an exact version, integrity hash, lockfile, verified source repository, or publisher-validation procedure. Consequently, the package contents executed by users can change after this Skill has been reviewed. npm installation may run package lifecycle scripts, while subsequent use executes the installed CLI. Because the Skill requires `BEESTAT_API_KEY`, the installed package may also operate in a process environment containing that credential. The CLI is expected to access sensitive household telemetry, including occupancy, thermostat status, temperatures, and HVAC history. The repository contains no copy of the package source, dependency manifest, or lockfile with which to verify the installed implementation. This does not establish that the current package is malicious, but it creates a supply-chain exposure if the npm package, publisher account, or a transitive dependency is compromised. ### Attack Path 1. An attacker compromises the `beestat-cli` npm package, its publisher account, or one of its installation/runtime dependencies. 2. The attacker publishes a malicious release under the package name used by the documented command. 3. A user or agent runs `npm install -g beestat-cli`, automatically selecting the attacker-controlled release. 4. Malicious code executes through an npm lifecycle script or when the installed CLI is invoked. 5. The code runs with the installing user's privileges and may read accessible environment variables, including `BEESTAT_API_KEY`. 6. When invoked, the compromised CLI may intercept or exfiltrate thermostat queries and sensitive househo ...[truncated 723 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
beestat-clito an explicitly reviewed version rather than installing the mutable latest release:bash npm install --global --ignore-scripts beestat-cli@<reviewed-version> - Document the authoritative npm publisher and source repository so users can verify package provenance before installation.
- Publish and verify package integrity information, such as the expected npm integrity digest or release artifact checksum.
- Review the pinned package and its transitive dependencies, and repeat that review before updating the documented version.
- Avoid global installation where possible. Prefer a project-local, locked dependency executed from a controlled environment.
- Disable npm lifecycle scripts with
--ignore-scriptsif the reviewed CLI does not require them. - Run the CLI as a non-privileged user and provide
BEESTAT_API_KEYonly to the specific process that requires it. - Restrict the API key to the minimum available permissions, rotate it if compromise is suspected, and avoid exposing it in shell history, logs, or persistent configuration files.
- Pin
