Back to skill

Security audit

TrencherAI — Base Chain Intelligence

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent paid token-intelligence API guide, but it enables automatic on-chain USDC payments without enough user-controlled spending safeguards.

Review this carefully before installing if your agent has an x402 wallet or Coinbase CDP payment capability. Use a low-balance dedicated wallet, require explicit approval or strict budgets, pin the expected host, network, USDC contract, recipient, and maximum price, and avoid automated loops or retries that could create repeated payments.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:7
Finding

Automatic Cryptocurrency Payments Lack Explicit Approval and Spending Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 7 and 143-172
Vulnerability Type: Automatic financial authorization without adequate consent, validation, or budget controls
Risk Level: Medium

Vulnerable Code

text
All endpoints use x402 micropayments (USDC on Base). No API key required. Your agent pays per request automatically if you have an x402-compatible client.
json
{
  "x402Version": 1,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",
    "amount": "50000",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab",
    "maxTimeoutSeconds": 60
  }]
}
javascript
import { createCdpAuthHeaders } from '@coinbase/x402';

const headers = createCdpAuthHeaders(apiKeyId, apiKeySecret);
const authHeaders = await headers();

const response = await fetch(
  'https://api.aitrencher.xyz/api/score-token?address=0x...',
  { headers: authHeaders.verify }
);

Technical Analysis

The Skill instructs an x402-compatible client to pay USDC automatically when invoking a third-party token-intelligence API. Locally held Coinbase CDP credentials are used to generate authorization headers, which are then sent to api.aitrencher.xyz.

The reviewed content does not transmit the raw apiKeyId or apiKeySecret, so direct credential exfiltration is not established. Nevertheless, the generated header is sensitive because it authorizes a financial operation.

The instructions do not require:

  • Explicit user approval before each payment.
  • A per-request or cumulative spending limit.
  • Rate limiting for automated calls.
  • Client-side allowlisting of the destination host and payment recipient.
  • Verification that the chain, token contract, amount, and payee in the HTTP 402 response match trusted values.
  • Duplicate-payment prevention during retries.
  • Defined validation of nonce, expiration, and replay protection.

Network payment authorization is relevant t ...[truncated 1752 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable automatic payment by default and require explicit, informed user approval before each transfer.
  2. Display the destination host, recipient wallet, network, asset, exact amount, and purpose before approval.
  3. Enforce strict per-request, per-session, and daily spending limits independent of server-provided payment terms.
  4. Pin and validate all payment parameters before signing:
    • Host: api.aitrencher.xyz
    • Network: Base Mainnet, eip155:8453
    • Asset: approved USDC contract
    • Recipient: explicitly trusted wallet
    • Amount: no greater than the documented endpoint price
    • Nonce, expiration, and request binding: valid and unique
  5. Reject redirects and any unexpected changes to the host, payee, asset, chain, or price.
  6. Add rate limits and require renewed approval when an automation threshold is reached.
  7. Implement idempotency controls so retries cannot create duplicate payments.
  8. Store signing credentials in a secret manager or protected wallet service; never expose them to Skill text, model context, logs, URLs, or third-party servers.
  9. Treat generated authorization headers as secrets and ensure they are neither logged nor reusable.
  10. Document revocation, timeout, replay-protection, retry, and payment-failure behavior.
  11. Use a dedicated low-balance wallet with narrowly scoped permissions rather than a primary wallet.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill describes x402 micropayments and 'your agent pays per request automatically,' but it does not present a prominent user-facing warning at the top that invoking endpoints will spend on-chain funds from the agent wallet. In an agent setting, hidden or insufficiently emphasized payment behavior can cause unintended financial loss through routine use, loops, or repeated calls.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Network:** Base Mainnet (eip155:8453)
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- **Token:** USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
- **Pay-to:** 0xd3c3b0b35a9252f438ac3c86ca0ce18caa02ccab
- **Facilitator:** https://api.cdp.coinbase.com/platform/v2/x402
- **x402 Discovery:** https://api.aitrencher.xyz/.well-known/x402.json
- **ERC-8004 Agent:** https://www.8004scan.io/agents/base/29167

---

Static analysis

No suspicious patterns detected.