T08 · Insecure Dependencies
Error
- Location
- SKILL.md:27
- Finding
- Unpinned Package Execution Through npx or bunx## Vulnerability Details **File Location**: `SKILL.md`, line 27 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High **Vulnerable Code Snippet**: ```text Run `git-escrows --help` to verify the CLI is installed. If it fails, try `npx git-escrows --help` or `bunx git-escrows --help`. Use whichever works for all subsequent commands. If none work, tell the user to install with `npm i -g git-escrows`. ``` ### Technical Analysis The Skill instructs the Agent to execute `git-escrows` through `npx` or `bunx` without specifying a reviewed package version or validating package integrity. These package runners can retrieve the latest available package from a configured registry when it is not already installed locally. The instruction to use the successful runner for “all subsequent commands” expands the risk beyond displaying help. The remotely obtained package may subsequently process wallet configuration, access the `PRIVATE_KEY` environment variable, and construct or submit a transaction that locks ERC20 assets. This creates a supply-chain dependency on the mutable state of the package registry. Package compromise, maintainer account takeover, malicious version publication, registry substitution, or an unsafe custom registry could cause attacker-controlled code to execute in the Agent's environment. ### Attack Path 1. An attacker compromises the `git-escrows` package, its publisher account, or the package registry used by `npx` or `bunx`. 2. The attacker publishes a malicious package version under the expected package name. 3. The locally installed `git-escrows` command is unavailable, causing the Agent to follow the fallback instruction. 4. The Agent runs `npx git-escrows --help` or `bunx git-escrows --help`, downloading and executing the unpinned package. 5. The malicious package executes with the permissions and environment of the Agent. 6. It may read `.env` or `PRIVATE_KEY`, alter escrow ...[truncated 911 chars]
- Remediation
- ## Remediation Suggestions - Remove automatic fallback to unversioned `npx` and `bunx` execution. - Require a specific, security-reviewed version, such as `npx git-escrows@<approved-version>`, rather than resolving the latest release. - Verify the package version and integrity digest before execution. - Prefer a project-local dependency installed from a lockfile using a reproducible installation command such as `npm ci`. - Document the expected package publisher, registry, version, and checksum. - Run the CLI in a restricted environment with access only to the files and network destinations required for the transaction. - Require the user to independently review and confirm the network, chain ID, token, arbiter, oracle, reward, recipient, and contract calldata before signing. - Use a dedicated low-balance wallet for escrow operations rather than exposing a general-purpose wallet to third-party CLI code.
