Back to skill

Security audit

Ai Trader

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent AI-Trader integration, but it handles account credentials and trading-related actions with too little scoping, consent guidance, and transport safety.

Install only if you intentionally want an agent to interact with AI-Trader. Use unique credentials, avoid reusing financial passwords, require manual confirmation for registration and every trading or posting action, and avoid plaintext WebSocket notification use unless the provider offers a secure wss:// endpoint.

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:39
Finding

Plaintext WebSocket Endpoint Exposes Trading Notifications to Network Interception

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 39
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

Vulnerable Code:

markdown
| WebSocket | `ws://ai4trade.ai/ws/notify/{client_id}` | Real-time notifications |

Technical Analysis

The documented real-time notification endpoint uses plaintext WebSocket transport (ws://) instead of TLS-protected WebSocket transport (wss://). Plaintext WebSocket traffic does not provide transport-layer confidentiality, integrity, or server authentication.

If an agent follows this documentation while connected through an untrusted or compromised network, an on-path attacker may observe notification contents or modify WebSocket frames in transit. Because the Skill concerns trading signals and account-related notifications, manipulated messages could affect downstream agent decisions. The documentation does not require encrypted transport, certificate validation, or rejection of plaintext fallback.

The separate registration example uses HTTPS and sends credentials only as part of the declared account-registration function. No evidence was found that the Skill intentionally steals credentials, executes remote payloads, establishes persistence, or requests unnecessary local privileges.

Attack Path

  1. An agent connects to ws://ai4trade.ai/ws/notify/{client_id} as documented.
  2. The connection traverses an attacker-controlled or otherwise untrusted network, such as a malicious access point or compromised gateway.
  3. Because the connection is not protected by TLS, the attacker intercepts the WebSocket handshake and subsequent frames.
  4. The attacker reads, suppresses, replays, or alters real-time notification messages.
  5. If the consuming agent treats those messages as trusted market or account events, forged notifications may influence its trading-related behavior.

Impact Assessment

Exploitation does not directly gra ...[truncated 375 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace the endpoint with wss://ai4trade.ai/ws/notify/{client_id} and remove support for plaintext WebSocket connections.
  • Require normal TLS certificate and hostname validation; do not permit invalid certificates or insecure fallback to ws://.
  • Authenticate and authorize each WebSocket connection using a short-lived credential bound to the intended client and minimum required scope.
  • Avoid placing reusable secrets in URLs, where they may be exposed through logs, browser history, or monitoring systems.
  • Add message-level integrity controls, sequence identifiers, timestamps, and replay protection where notifications can trigger consequential agent behavior.
  • Validate notification schemas and require explicit confirmation or independent verification before executing trading actions based on received messages.
  • Update the Skill documentation to warn users that credentials are sent to an external service and recommend unique credentials with explicit user consent.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (6)

Self-Modification

High
Category
Rogue Agent
Confidence
90% 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.

Content

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

md
---
name: ai-trader
description: AI-Trader Agent-Native Trading Platform — register, trade, copy-trade, and self-evolve through market feedback
compatibility: opencode
trigger: user mentions trading, signals, copy trading, AI-Trader, ai4trade
tags: [trading, ai-agent, signals, copy-trading, hkuds]

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrase is broad enough to activate on generic user interest in trading or signals, which can cause the skill to engage in contexts where the user did not explicitly ask to use this third-party platform. In a skill that encourages account registration, trading actions, and external connectivity, overbroad invocation increases the chance of unsolicited promotion or accidental steering into risky financial workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes a registration example that asks for email and password and immediately transmits them to a remote service, but provides no warning about credential handling, third-party trust, financial risk, or consent. In the context of a trading platform, this is especially dangerous because it can normalize entering credentials into agent-driven workflows and lead to account creation or sensitive data disclosure without informed user approval.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This code performs an outbound POST request to a third-party domain and transmits sensitive registration data including email and password. External transmission of credentials is inherently risky in agent skills because it can expose secrets, create accounts, or trigger irreversible actions without adequate validation, consent, or provenance checks.

Content

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

python
import requests

resp = requests.post("https://ai4trade.ai/api/claw/agents/selfRegister", json={
    "name": "YourAgentName",
    "email": "your@email.com",
    "password": "your_password"

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This code performs an outbound POST request to a third-party domain and transmits sensitive registration data including email and password. External transmission of credentials is inherently risky in agent skills because it can expose secrets, create accounts, or trigger irreversible actions without adequate validation, consent, or provenance checks.

Content

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

python
import requests

resp = requests.post("https://ai4trade.ai/api/claw/agents/selfRegister", json={
    "name": "YourAgentName",
    "email": "your@email.com",
    "password": "your_password"

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 64)May include surrounding context.

md
- GitHub: https://github.com/HKUDS/AI-Trader
- Platform: https://ai4trade.ai
- API Docs: https://api.ai4trade.ai/docs

Static analysis

No suspicious patterns detected.