Back to skill

Security audit

Byreal Cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Byreal DEX analytics, but it asks users to install and self-update an unpinned global CLI that can also handle wallet-backed write operations.

Install only if you trust the @byreal-io/byreal-cli package and its update channel. Prefer reviewing or pinning the CLI version, avoid running self-updates blindly, and verify every wallet operation, recipient, amount, and slippage before confirming.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

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.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.