T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Package Execution Through npx or bunx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 27
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighVulnerable 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-escrowsthroughnpxorbunxwithout 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_KEYenvironment 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
- An attacker compromises the
git-escrowspackage, its publisher account, or the package registry used bynpxorbunx. - The attacker publishes a malicious package version under the expected package name.
- The locally installed
git-escrowscommand is unavailable, causing the Agent to follow the fallback instruction. - The Agent runs
npx git-escrows --helporbunx git-escrows --help, downloading and executing the unpinned package. - The malicious package executes with the permissions and environment of the Agent.
- It may read
.envorPRIVATE_KEY, alter escrow ...[truncated 911 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Remove automatic fallback to unversioned
npxandbunxexecution. - 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.
- Remove automatic fallback to unversioned
