Back to skill

Security audit

Superior Trade

Security checks for vulnerabilities and agentic risk

Overview

This trading skill is mostly coherent, but it needs review because one Aerodrome guide can lead agents to request wallet private keys and inspect unrelated local source files.

Install only if you trust Superior Trade with an API key that can start live trading and move supported funds. Never provide private keys or seed phrases through chat; if any Aerodrome flow asks for one, stop. Do not let the skill inspect local developer paths outside the package unless you separately authorize those files.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
exchanges/aerodrome.md:21
Finding
Skill Directs the Agent to Access Files Outside the Packaged Project<![CDATA[ ## Vulnerability Details **File Location**: `exchanges/aerodrome.md`, lines 21–31 **Vulnerability Type**: Least-privilege violation through out-of-scope filesystem access **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## Source Of Truth When behavior is unclear, inspect these local sources before answering: - Production API: `https://api.superior.trade` - API: `/Users/trmaphi/sources/superior-trade/api` - Freqtrade fork: `/Users/trmaphi/sources/superior-trade/freqtrade-upstream` - Aerodrome exchange wrapper: `freqtrade-upstream/freqtrade/exchange/aerodrome.py` - Aerodrome CCXT implementation: `freqtrade-upstream/ccxt/python/ccxt/aerodrome.py` - API validation: `api/src/freqtrade/schema.ts` - API config padding: `api/src/freqtrade/configurationsOp.ts` ``` ### Technical Analysis The Skill instructs the Agent to inspect absolute developer-machine paths and repository files that are not included in the packaged project. These paths are outside the declared Skill boundary and are not required to consume the documented Superior Trade API. If those paths exist on the execution host, following the instruction could cause the Agent to read proprietary source code, local configuration, comments, repository metadata, or other information that the user did not authorize it to access. The relative paths also implicitly assume access to an external monorepository. This expands the filesystem trust boundary beyond the minimum privileges needed for the Skill’s declared backtesting and deployment functionality. Required behavioral documentation should instead be packaged with the Skill or obtained from an approved, version-pinned public specification. ### Attack Path 1. A user invokes the Aerodrome Skill for a behavior that is unclear or not fully documented. 2. The Skill instructs the Agent to treat local external repositories as the source of truth. 3. The Agent attempts to read `/Users/trmaphi/sources/superior-trade/api`, `/Users/trmaphi/so ...[truncated 1062 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all absolute developer-machine paths and references to unpackaged local repositories. 2. Package the required API schemas and exchange behavior documentation within the Skill directory. 3. If external documentation is necessary, use an official HTTPS endpoint pinned to a specific version or commit. 4. Add an explicit rule that the Agent must not inspect files outside the Skill directory unless the user separately identifies and authorizes those files. 5. Treat unavailable implementation details as an unsupported condition rather than searching the host filesystem. 6. Review the rest of the documentation for internal monorepository paths and replace them with packaged or public references. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
exchanges/aerodrome.md:345
Finding
Legacy Aerodrome Flow Conditionally Permits Solicitation of Wallet Private Keys<![CDATA[ ## Vulnerability Details **File Location**: `exchanges/aerodrome.md`, lines 345–347 **Vulnerability Type**: Conditional solicitation of wallet signing secrets **Risk Level**: High ### Vulnerable Code Snippet ```markdown 2. Store or confirm credentials using the current API behavior: - Prefer the documented v2 flow when supported: `POST https://api.superior.trade/v2/deployment/{id}/credentials` with `{"exchange":"aerodrome"}`. - If the current API rejects Aerodrome on the v2 credentials route, inspect the local `api/src/routes/credentials-v2.ts`, `api/src/routes/deployment.ts`, and OpenAPI before proceeding. Do not ask the user for private keys unless the live API explicitly requires that legacy flow. ``` ### Technical Analysis The phrase “unless the live API explicitly requires that legacy flow” creates an exception that permits the Agent to ask a user for a wallet private key. A wallet private key is a non-recoverable signing credential that can authorize irreversible blockchain transactions and must never be placed in chat messages, Agent context, deployment configuration, logs, or API requests. The instruction is also inconsistent with the project’s primary security requirements in `SKILL.md`, which state that the Agent must never ask for private keys, include them in API requests, or log, store, or display them. Security-critical prohibitions must be unconditional and must not depend on mutable remote API behavior or remote documentation. A compromised, misconfigured, obsolete, or spoofed API response could claim that a private key is required. The current wording would allow the Agent to interpret that response as authorization to solicit the secret. ### Attack Path 1. A user attempts to create a live Aerodrome deployment. 2. The documented v2 credentials endpoint rejects Aerodrome, is unavailable, or returns instructions for a legacy credential flow. 3. The Agent inspects mutable API documentation or local implementation files as di ...[truncated 1441 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the conditional language with an unconditional rule: never request, accept, transmit, log, display, or store private keys or seed phrases. 2. If the platform-managed credentials route does not support Aerodrome, stop the live deployment workflow and report that secure credential provisioning is unavailable. 3. Direct users only to an official wallet-side authorization or platform onboarding process that keeps signing keys under user or approved platform custody. 4. Do not accept remote API documentation as authority to weaken secret-handling requirements. 5. Add input handling that detects apparent private keys or seed phrases, refuses to process them, and instructs the user to rotate any secret already disclosed. 6. Align `exchanges/aerodrome.md` with the unconditional security requirements in `SKILL.md`. 7. Add automated documentation linting that rejects phrases permitting private-key collection and flags credential workflows inconsistent with the declared authentication model. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (53)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
5. `GET /v2/backtesting/{id}` — fetch full results; download `resultUrl` for detailed JSON
6. Present summary: total trades, win rate, profit, drawdown, Sharpe ratio
7. If failed, check `GET /v2/backtesting/{id}/logs`
8. To cancel: `DELETE /v2/backtesting/{id}`

#### Backtest Wallet and Stake Sizing
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
5. `GET /v2/backtesting/{id}` — fetch full results; download `resultUrl` for detailed JSON
6. Present summary: total trades, win rate, profit, drawdown, Sharpe ratio
7. If failed, check `GET /v2/backtesting/{id}/logs`
8. To cancel: `DELETE /v2/backtesting/{id}`

#### Backtest Wallet and Stake Sizing
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

High
Confidence
98% confidence
Finding
The workflow instructs the agent to deploy a winning strategy and then submit wallet credentials, but it does not require an explicit user-facing warning about real-money trading risk, execution risk, or the sensitivity of wallet credentials. This is dangerous because it can normalize handing secrets to the agent and moving from analysis to live capital exposure without informed consent or security hygiene.

Self-Modification

High
Category
Rogue Agent
Content
## Variants

- **Daily / monthly cadence**: change `current_time.weekday() != 0` to `current_time.day != 1` (1st of month) or remove the guard entirely (every candle close).
- **Drawdown-aware DCA**: add a check on `current_profit < -0.10` to add EXTRA on top of the calendar — buy more when down 10%. Combine the calendar check with `current_profit < threshold`.
- **Spot vs futures**: works on both. Use `BTC/USDC` for spot (`trading_mode: "spot"` or omit) or `BTC/USDC:USDC` for perp (`trading_mode: "futures"`, `margin_mode: "cross"`). DCA is most idiomatic on spot.
Confidence
70% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
externalEndpoints:
  - url: https://api.superior.trade
    purpose: "All backtesting and deployment operations"
  - url: https://api.hyperliquid.xyz/info
    purpose: "Read-only public queries. Balance checks send the user's public wallet address (not a secret — visible on-chain). Pair validation sends no user data. No authentication or secrets are sent to this endpoint."
---
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Behavior Manipulation

Medium
Category
Prompt Injection
Content
- Always check the **main wallet's** balance, not the agent wallet's
- The API can deposit native Arbitrum USDC from the user's platform-managed wallet into Hyperliquid via `POST /v2/portfolio/hyperliquid/deposit`
- The API cannot withdraw from Hyperliquid or bridge unsupported assets/chains
- **NEVER tell users to deposit to the agent wallet address**

### Funding, Deposits, and Balance Checks
Confidence
75% confidence
Finding
Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

External Transmission

Medium
Category
Data Exfiltration
Content
### Hyperliquid Authorize-and-Send API

`POST https://api.superior.trade/v2/authorize-and-send/hyperliquid`

A unified endpoint for Hyperliquid operations. All requests use `{"type": "...", ...}` body. Requires `x-api-key` header.
Confidence
86% confidence
Finding
This endpoint authorizes and sends fund-moving operations such as sub-account creation and asset transfers using the user's high-privilege API key. Although intended platform functionality, it materially expands the blast radius of an agent mistake or prompt-injection event because the skill enables collateral movement between user-controlled accounts, potentially underfunding live strategies or causing forced liquidation risk.

External Transmission

Medium
Category
Data Exfiltration
Content
Returns setup status for the authenticated user before live trading. Use this as the first live-deployment readiness check.

```bash
curl -sS "https://api.superior.trade/v2/account/status" \
  -H "accept: application/json" \
  -H "x-api-key: ${SUPERIOR_TRADE_API_KEY}"
```
Confidence
88% confidence
Finding
This authenticated call uses an API key that can start live trading and move user funds into Hyperliquid, so exposure or misuse of the credential has significant consequences. The risk is amplified by the skill's broad write scope and automated workflow orientation, even though the example itself is legitimate documentation.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Backtest Workflow

1. Build Aerodrome config and Freqtrade strategy code.
2. Check data availability with `GET https://api.superior.trade/v2/backtesting-data/aerodrome?pair=AERO/USDC&timeframe=5m`.
3. Create a backtest with `POST https://api.superior.trade/v2/backtesting` using `{ "config": {}, "code": "...", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }`.
4. Start it with `PUT https://api.superior.trade/v2/backtesting/{id}/status` and `{ "action": "start" }`.
5. Poll `GET https://api.superior.trade/v2/backtesting/{id}/status` until `completed` or `failed`.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.