T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Global Installation of an Unverified Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 8–13 and 43–47 **Vulnerability Type**: Supply-chain exposure through a third-party dependency **Risk Level**: Medium ### Evidence ```yaml install: - kind: node package: "@andreasnlarsen/whoop-cli@0.5.2" bins: - whoop label: Install whoop-cli from npm ``` ```bash npm install -g @andreasnlarsen/whoop-cli@0.5.2 ``` ### Technical Analysis The skill directs users or agents to globally install and execute the third-party npm package `@andreasnlarsen/whoop-cli@0.5.2`. The package version is pinned, which reduces version drift, but no package integrity hash, vendored source, lockfile, or independently auditable implementation is included in the reviewed project. npm installation may execute package lifecycle scripts, including `preinstall`, `install`, and `postinstall`, with the permissions of the user performing the installation. A global installation also places the package's executable in a shared command location, extending trust beyond the immediate project. Because this CLI handles WHOOP authentication and sensitive health information, compromise of the package or its transitive dependency chain could expose valuable credentials and data. The audited file does not demonstrate that the named package is malicious. The finding concerns the trust and supply-chain boundary created by automatically installing unaudited third-party code from an external registry. ### Attack Path 1. An attacker compromises the specified npm package, its publisher account, the npm distribution path, or a transitive dependency used by the package. 2. The user or agent follows the bootstrap instruction and runs: ```bash npm install -g @andreasnlarsen/whoop-cli@0.5.2 ``` 3. npm downloads the external package and may execute its lifecycle scripts with the installing user's permissions. 4. Malicious installation or runtime code gains access to ...[truncated 1276 chars]
- Remediation
- ## Remediation Suggestions 1. **Provide auditable implementation material** - Include the CLI source or a reviewed, reproducible artifact in the project. - Document the exact source repository, commit, build process, and release provenance corresponding to version `0.5.2`. 2. **Verify package integrity** - Pin the expected npm integrity digest in a lockfile or installation manifest. - Verify the downloaded package tarball against a trusted checksum before installation. - Use npm provenance or signed release attestations where available. 3. **Avoid global installation** - Prefer a project-local installation with an exact lockfile. - Execute the package from a constrained project environment instead of placing its binary in a shared global command path. 4. **Control lifecycle scripts** - Review all required lifecycle scripts and transitive dependencies. - Use `--ignore-scripts` when the package does not require installation scripts. - If scripts are required, execute installation in an isolated environment with minimal filesystem, network, environment-variable, and credential access. 5. **Apply runtime least privilege** - Run the CLI as a non-administrative user. - Restrict access to unrelated files, credentials, and agent directories. - Keep credential storage isolated and ensure the CLI receives only the minimum secrets needed for its operation. 6. **Continuously monitor the dependency** - Audit the package and its transitive dependency tree before updates. - Monitor publisher ownership changes, unexpected release activity, known vulnerabilities, and integrity changes. - Require explicit review before changing the pinned package version.
