T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party Package and Repository Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:4`, `SKILL.md:19-20`, and `SKILL.md:23-27` **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium ### Vulnerable Code Metadata installation command at `SKILL.md:4`: ```yaml metadata: {"clawdbot":{"emoji":"📊","os":["macos"],"requires":{"bins":["claude-usage","node"]},"install":[{"id":"npm","kind":"shell","command":"npm install -g claude-usage-cli","bins":["claude-usage"],"label":"Install claude-usage-cli via npm"}],"source":"https://github.com/cyberash-dev/claude-usage-cli"}} ``` Documented npm installation at `SKILL.md:19-20`: ```bash npm install -g claude-usage-cli ``` Documented source installation at `SKILL.md:23-27`: ```bash git clone https://github.com/cyberash-dev/claude-usage-cli.git cd claude-usage-cli npm install && npm run build && npm link ``` ### Technical Analysis Both installation methods execute externally maintained code without pinning it to an audited package version, repository commit, or integrity digest. The global npm command resolves the package version from the registry at installation time. npm installation can execute dependency or package lifecycle scripts with the permissions of the invoking user. The source installation method clones the repository's current default branch, installs its current dependency graph, runs the repository-controlled build command, and globally links the resulting executable. Consequently, the effective code executed by these instructions can change after the Skill itself has been reviewed. The artifact contains only `SKILL.md` and `_meta.json`; it does not contain the CLI implementation or a lockfile that would allow the claims concerning Keychain storage, network destinations, and data persistence to be independently verified. No evidence in the reviewed artifact establishes that the referenced package or repository is currently malicious. The vulnerability is the absence of rep ...[truncated 1950 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the npm package to a specific reviewed version rather than resolving the latest release: ```bash npm install -g claude-usage-cli@<reviewed-version> ``` 2. Record and verify the expected package integrity digest before installation. Publish the verified package version and checksum in the Skill documentation. 3. For source installation, pin a full reviewed commit hash: ```bash git clone https://github.com/cyberash-dev/claude-usage-cli.git cd claude-usage-cli git checkout --detach <reviewed-full-commit-hash> ``` 4. Include and enforce a lockfile for reproducible transitive dependency resolution. Prefer `npm ci` over an unconstrained `npm install`. 5. Review npm lifecycle scripts and dependencies before installation. Use `--ignore-scripts` when lifecycle scripts are unnecessary, and run any required build step separately only after inspection. 6. Avoid global installation where possible. Install into an isolated, least-privileged environment and invoke the pinned executable through an explicit path. 7. Vendor the reviewed implementation into the audited artifact, or provide signed release artifacts with provenance attestations so the installed code can be tied to the reviewed source. 8. Update the Skill's deprecated installation metadata so automated installers do not continue installing an unmaintained and unpinned package. Prefer the actively maintained replacement only after applying the same version-pinning and integrity-verification controls. ]]>
