Back to skill

Security audit

HyperGrok Hyperliquid Setup

Security checks for vulnerabilities and agentic risk

Overview

This setup skill is transparent and purpose-aligned, but it handles a Hyperliquid trading API key, so users should understand the disclosed secret-storage risks before using it.

Use this only for a Hyperliquid desk where you intend an agent to work with a trade-only API wallet. Prefer the secure secret store, keep main-wallet keys and seed phrases off the desk computer, use testnet first, revoke or rotate the API wallet after setup changes or suspected misuse, and avoid the file fallback unless your environment has no safer secret mechanism.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Env Variable Harvesting

High
Category
Data Exfiltration
Content
from hyperliquid.utils import constants

def load_key():
    k = os.environ.get("HYPERLIQUID_PRIVATE_KEY")
    if not k:
        p = os.path.expanduser("~/.hyperliquid/api-wallet.key")
        if os.path.exists(p):
Confidence
95% confidence
Finding
The skill explicitly instructs code to load a private trading key from an environment variable, which makes that secret available to any process, subprocess, debugging output, or co-resident bot on the desk computer. In this skill's own threat model, 'anything on it is readable by every Bot,' so exposing a live API wallet key to the runtime environment materially increases the chance of key theft and unauthorized trading or internal asset movements allowed to the agent wallet.

Session Persistence

Medium
Category
Rogue Agent
Content
### 4.2 The user provides the key through the secure secret store

Grok Bot has a secure secret card for exactly this. Ask the user to add a secret named `HYPERLIQUID_PRIVATE_KEY` with the API wallet's private key. Never ask them to paste it in chat and never write it to a file under `/workspace`.

If the desk's Grok Bot setup exposes secrets to the computer as environment variables, scripts read `HYPERLIQUID_PRIVATE_KEY` from the environment. If it does not, the fallback is a file the **user** creates while in control of the computer:
Confidence
88% confidence
Finding
The skill provides a persistence fallback in `~/.hyperliquid/api-wallet.key`, creating a durable plaintext secret on disk. Even though it recommends restrictive permissions and avoids `/workspace`, a persistent file on a shared bot workstation expands the attack window: any local compromise, backup leakage, or later process running as the same user can recover the trading key and abuse the wallet's allowed actions.

Static analysis

No suspicious patterns detected.