T01 · Skill Instruction Hijacking
- Location
SKILL.md:657- Finding
Mandatory Brand Attribution Hijacks Agent Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Web3 swap helper, but it asks for high-impact trading authority while giving inconsistent automation, hosting, and risk-control instructions.
Review this carefully before installing. Treat it as a high-impact financial automation skill: use only small test amounts, verify every wallet prompt, avoid the delegated Hyperliquid Agent Wallet flow unless you understand and accept ongoing trading authority, and do not upload wallet-specific swap pages to public hosts. Prefer an isolated Python environment and inspect installer/dependency changes before use.
SKILL.md:657Mandatory Brand Attribution Hijacks Agent Output
install.sh:1Installer Recommends Piping Mutable Remote Content Directly into a Shell
scripts/swap_page_gen.py:284Remote Transaction Fields Are Injected into Executable JavaScript Without Context-Safe Serialization
scripts/zeroex_client.py:250Documented Financial Risk Limits Are Not Enforced by the Runtime
references/local-cli.md:14Wallet-Specific Transaction Pages Are Uploaded to Anonymous Third-Party Hosting
requirements.txt:1Unpinned Dependencies Are Installed into the Active Python Environment
The declared description presents an end-user trading skill focused on DEX swaps, Hyperliquid limit/perpetual trading, wallet integrations, and risk controls. The supplied code chunk does not implement any of those trading behaviors. Instead, it is an installation/setup script that prepares directories, copies a config file, installs dependencies, and references a 0x API key. That is a materially different primary purpose from the declared trading functionality. While installer logic can be a supporting detail for a skill, this chunk specifically exposes undeclared setup/configuration behavior and reveals an integration target (0x API) inconsistent with the stated Antalpha AI/Hyperliquid-centric description.
The description claims a broad DEX trading skill with v1 aggregator swaps and v2 advanced trading capabilities such as Hyperliquid limit orders, perpetuals, risk control, balance checks, and failure-tolerant order management. The supplied code does not implement those features. Instead, it generates a cyberpunk-themed swap confirmation page, optionally embeds a QR code, provides wallet deeplinks for MetaMask/OKX/Trust/TokenPocket, detects whether a browser has an injected wallet, and on user action sends a precomputed Ethereum transaction using eth_sendTransaction. Multi-wallet support and zero-custody wallet signing are consistent with the description, and swap-related behavior is adjacent, but the primary implemented capability in this chunk is UI/page generation and wallet transaction submission for Ethereum swap execution, not the broader trading/Hyperliquid/risk-control functionality claimed. That is a material description-behavior mismatch.
该代码块的核心用途与声明的一部分相符:它确实围绕 DEX token swap 展开,并支持生成供钱包签名的交易数据,符合“零托管、私钥不离开钱包”的方向。但声明描述的是一个更完整、更广泛的交易技能,覆盖限价单、永续合约、Hyperliquid、仓位管理、资金费率、风控确认、余额预检、订单修改等高级能力;而代码只实现了 swap 报价/路由、构建交易、导出支付链接、生成 HTML/二维码页面、gas 和 token 查询。也就是说,声明显著夸大了实际能力范围。虽然代码没有出现明显危险的未声明外部资源访问,但其实际功能集与声明的主能力集合存在实质性不一致,因此应判定为 mismatch。
The declared description presents a broad trading skill covering swap execution plus advanced order types and derivatives workflows. The supplied code only wraps the 0x allowance-holder swap API to fetch price/quote data and transaction parameters for token swaps on Ethereum. It is consistent with a narrow swap-quote client, but materially does not implement the many advertised v2 features: no Hyperliquid integration, no limit-order book logic, no perpetual contract handling, no position/risk/funding functions, no wallet-specific integration, and no explicit zero-custody signing mechanism beyond returning tx fields. While returning quote transaction data is compatible with a swap skill, the actual behavior is much narrower than the declared purpose, so this is a description-behavior mismatch.
The document states that automatic trade execution was removed, but another section still describes a 2-second countdown that automatically triggers eth_sendTransaction in wallet browsers. In a trading context, contradictory guidance around auto-submission is high risk because implementers or downstream agents may preserve or recreate a flow that causes transaction prompts without clear, informed user initiation.
The documented 'one-time approval' model establishes persistent delegated trading authority, allowing the agent to place, modify, and cancel trades later without fresh per-action user consent. In a financial skill, this is highly dangerous because any prompt injection, account compromise, or model mistake can convert standing authority into unauthorized market activity on the user's account.
The risk workflow explicitly permits automatic execution of 'small' trades followed only by after-the-fact notification, meaning financial actions can occur without contemporaneous user approval. Even small autonomous trades are unsafe in aggregate and can be abused repeatedly, especially when combined with broad triggers and delegated credentials.
The installer explicitly encourages execution via curl ... | bash, which causes users to run remotely fetched code without an opportunity to inspect, pin, or verify it first. If the distribution channel, hosting location, or network path is compromised, arbitrary shell commands would execute immediately in the user's environment.
#!/bin/bash
# Web3 Trader Skill Installer
# Usage: curl -fsSL install.sh | bash
set -e
The | bash pattern is dangerous because it turns a transport operation into immediate code execution, eliminating review and increasing the blast radius of any compromise. In a web3 trading skill, this is especially sensitive because the environment may hold wallet tooling, API keys, and trading-related configuration that an attacker could abuse.
#!/bin/bash
# Web3 Trader Skill Installer
# Usage: curl -fsSL install.sh | bash
set -e
Advertising 'auto-execute in wallet dApp browser (2s countdown → direct signature popup)' describes a workflow that nudges or accelerates users into transaction signing with minimal friction. In a financial trading skill, that pattern is dangerous because it reduces meaningful review time, increases the chance of mistaken or manipulated trades, and can be abused if paired with deceptive UI or altered transaction details.
- 💱 Real-time DEX quotes and optimal routing via Antalpha AI Aggregator
- 🌐 Cyberpunk-style swap pages (Matrix rain animation + scanline effects)
- 📱 4 major wallets: MetaMask, OKX Web3, Trust Wallet, TokenPocket
- ⚡ Auto-execute in wallet dApp browser (2s countdown → direct signature popup)
- 📷 QR code generation with cyberpunk theme (cyan dots on dark background)
- 🔒 Zero custody — private keys never leave the user's wallet
- 🤖 MCP remote mode — one `swap-full` call does quote + page hosting
The README promotes a remote MCP flow that performs quote generation, page hosting, and QR/deeplink delivery via a third-party server, but it does not clearly disclose that trade parameters and the taker wallet address may be sent to external infrastructure. In a trading skill, this omission is security-relevant because users may incorrectly infer that 'zero custody' also means minimal data exposure, when in reality transaction metadata can be collected, logged, correlated, or used for profiling and trade surveillance.
The Security section strongly emphasizes zero custody and no private-key handling, but it omits that hosted preview pages, QR links, wallet deeplinks, and remote quote/page generation still expose sensitive transaction metadata to third-party infrastructure. In a Web3 trading context, this is dangerous because users may over-trust the skill's privacy properties and disclose trading intent, wallet identity, and behavioral patterns that can be logged or correlated across sessions.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
### v1.0.4 (2026-03-28)
- **[P0]** Fix `examples/` and `tests/` using wrong parameter names (`wallet_address`/`slippage` → `taker`)
- **[P0]** Fix XSS vulnerability in `swap_page_gen.py` — all user-controlled data now escaped via `html.escape()`
- **[P0]** Remove auto-execute in dApp browser — users must explicitly click to confirm swap
- **[P1]** Add `timeout=30s` to all HTTP requests to prevent infinite hangs
- **[P1]** Preserve exception info in `get_gas_info()` error handling
- **[P1]** Add error handling for file write in `cmd_swap_page`
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
### v1.0.4 (2026-03-28)
- **[P0]** Fix `examples/` and `tests/` using wrong parameter names (`wallet_address`/`slippage` → `taker`)
- **[P0]** Fix XSS vulnerability in `swap_page_gen.py` — all user-controlled data now escaped via `html.escape()`
- **[P0]** Remove auto-execute in dApp browser — users must explicitly click to confirm swap
- **[P1]** Add `timeout=30s` to all HTTP requests to prevent infinite hangs
- **[P1]** Preserve exception info in `get_gas_info()` error handling
- **[P1]** Add error handling for file write in `cmd_swap_page`
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
### v1.0.0 (2026-03-27)
- Cyberpunk swap pages (Matrix rain + scanline effects)
- 4 wallet support: MetaMask, OKX Web3, Trust Wallet, TokenPocket
- Auto-execute in wallet dApp browser (2s countdown)
- QR code generation (cyan on dark theme)
- Full CLI toolchain (price/route/build-tx/export/swap-page/gas/tokens)
The skill declares broad capabilities via metadata and documented workflows (network access, file writes, shell/Python execution) but does not define an explicit permission or allowed-tools scope. In an agent setting, missing tool scoping weakens least-privilege controls and makes it easier for trading-related prompts or malicious prompt injection to trigger filesystem, network, or shell actions beyond what is strictly required.
The activation scope is extremely broad and covers many ordinary trading-related words, increasing the chance the skill is invoked in contexts where the user did not intend to authorize trading assistance. For a finance skill with networked trading and wallet-related actions, overbroad triggering materially raises the risk of inappropriate tool use or premature progression toward transaction flows.
The security model claims the hosted page has 'no backend communication' in a way that can falsely reassure users, yet the same page is documented to invoke wallet RPC methods for chain switching and transaction submission. Misstating the trust and interaction model is dangerous in a financial skill because users may underestimate that opening the page can trigger privileged wallet prompts and on-chain actions.
The skill instructs use of HL_PRIVATE_KEY and account-address environment variables for automated trading without a strong warning that these are sensitive credentials granting ongoing delegated trading authority. In an agent environment, encouraging automatic retrieval of such secrets increases the blast radius of prompt injection, host compromise, or accidental cross-skill access.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
pip3 install -r requirements.txt --quiet
# Set permissions
chmod 600 "$CONFIG_DIR/config.yaml" 2>/dev/null || true
echo
echo "✅ Installation complete!"
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
zeroex: "YOUR_KEY_HERE" # Keep this file private!
- Set file permissions: `chmod 600 ~/.web3-trader/config.yaml`
- Never commit config.yaml to git
- Consider using environment variables in production
The instructions direct operators to upload a generated swap page containing trade context, wallet address, and transaction flow to a public third-party file host unrelated to the core trading function. In a Web3 trading skill, this expands data exposure beyond the declared wallet/DEX scope and can leak sensitive trade metadata or enable tampering/phishing if the hosted page is later shared with users.
The documentation introduces an unnecessary capability to send trade-related output to an external anonymous hosting service, which is not justified by the skill's stated functionality. Because this skill operates in a financial context, any extra network transfer of generated trading artifacts increases the risk of data leakage, untrusted content delivery, and abuse of the hosted page as a phishing surface.
The reference flow silently uploads a generated swap page to a public hosting service without any warning that trade-related data will leave the local environment. In a crypto trading skill, users are especially sensitive to wallet addresses, intended trades, and signing flows, so undocumented exfiltration to a third party creates privacy and social-engineering risk even if no private key is transmitted.
The workflow tells users to click a hosted link and sign a transaction, but it does not warn that signing may irreversibly move funds or that users must verify destination, token amounts, chain, and spender/contract details in their wallet. In the context of a DEX trading skill, this omission is especially dangerous because the core action directly triggers blockchain transactions that cannot be reversed once confirmed.