T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Global npm Dependency and Unreviewed Self-Update Mechanism## Vulnerability Details **File Location**: `SKILL.md:12-15, 27-32, 37-45` **Vulnerability Type**: Supply-chain exposure through an unpinned globally installed dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: - kind: node package: "@byreal-io/byreal-cli" global: true ``` ```bash # Check if already installed which byreal-cli && byreal-cli --version # Install npm install -g @byreal-io/byreal-cli ``` ```bash byreal-cli update check ``` ```bash byreal-cli update install ``` ### Technical Analysis The Skill directs users or agents to install `@byreal-io/byreal-cli` globally without specifying an audited version or integrity hash. It also directs them to use the CLI's self-update facility. Consequently, the executable code run by the Skill can change after the Skill itself has been reviewed. A package or update-channel compromise could therefore introduce arbitrary code without requiring any change to this repository. The global installation expands exposure by placing the executable in the user's shared command environment. The project contains no lockfile, vendored implementation, checksum, or signature policy with which the installed artifact's contents can be verified. No evidence establishes that the named package is currently malicious. The issue is the unsafe dependency and update model and its resulting supply-chain attack surface. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, update service, or a transitive dependency. 2. The attacker publishes a malicious package version or supplies a malicious update. 3. A user or agent follows the Skill's unpinned installation or self-update instructions. 4. The malicious package is installed globally and subsequently invoked as `byreal-cli`. 5. Its code executes with the privileges and data access of the installing or invoking user. 6. If wallet setup or write operations are later used, the compromised CLI may access wallet-relat ...[truncated 824 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@byreal-io/byreal-cli` to a specific version that has been reviewed rather than installing the latest available release. 2. Record and verify the expected package integrity hash or cryptographic signature before installation. 3. Prefer a project-local, locked installation over a global installation to reduce shared-environment exposure. 4. Add a lockfile and enforce reproducible dependency resolution, including transitive dependencies. 5. Remove the blanket self-update instruction. Require explicit review and approval before changing versions. 6. Verify npm provenance, publisher identity, repository linkage, and release signatures as part of each upgrade. 7. Run the CLI with least privilege and isolate it from unrelated credentials, files, and wallet material where practical. 8. For wallet-backed operations, independently verify transaction details, recipient addresses, token amounts, and program interactions before signing.
