Back to skill

Security audit

Trading Tournament

Security checks for vulnerabilities and agentic risk

Overview

This skill is for autonomous OKX trading and is mostly disclosed, but it needs review because it can use live funds and recommends a persistent auto-restart task without clear controls.

Install only if you knowingly want an autonomous trading system. Start with OKX demo credentials, do not enable withdrawal permissions, set strict account and exchange limits, and avoid the recommended Guardian cron or Windows Task for live trading unless the actual code, restart command, permissions, disable procedure, and failure limits have been reviewed.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:71
Finding
Persistent Scheduled Watchdog for Automatic Trading Process Restart## Vulnerability Details **File Location**: `SKILL.md`, lines 71–73 **Vulnerability Type**: `T06: System Persistence` **Risk Level**: Critical **Vulnerable Code Snippet**: ```markdown ### Cron Setup (recommended) Add a Guardian cron or Windows Task that checks `competition_log_okx.txt` freshness every minute. If log hasn't updated in 6 minutes → kill and restart. ``` The persistence behavior is also described at line 52: ```markdown | 5 | Guardian | Windows Task checks every minute, restarts if dead | ``` ### Technical Analysis The Skill recommends configuring an operating-system cron job or Windows scheduled task that executes every minute and automatically terminates and restarts the trading process. Such a task survives the original Skill run and user session, creating a persistent execution mechanism. No implementation is supplied for the Guardian, and the documentation does not define: - The exact executable and absolute path that the task will launch - How the target process is identified before termination - File ownership or integrity validation for the trading manager - The operating-system account and privileges under which it runs - A maximum restart count or automatic failure cutoff - A safe removal or disablement procedure - A requirement for user approval before restarting live trading Because the project only contains `SKILL.md`, the watchdog, trading manager, and claimed safeguards cannot be audited. The vulnerable behavior is therefore the documented recommendation to establish persistent scheduled execution, rather than a verified task installation performed by included code. ### Attack Path 1. A user follows the recommendation and creates a cron job or Windows scheduled task that runs every minute. 2. The task is configured to monitor `competition_log_okx.txt` and restart the referenced trading manager when the log becomes stale. 3. An attacker or another compromised process rep ...[truncated 1642 chars]
Remediation
## Remediation Suggestions 1. Remove the recommendation to create a cron job or Windows scheduled task. Prefer explicit, per-session startup initiated by the user. 2. Require fresh user confirmation before restarting any process capable of live trading. 3. If automated monitoring is operationally necessary, include the complete auditable Guardian implementation in the project. 4. Run the watchdog and trading manager under a dedicated, unprivileged operating-system account. 5. Use an absolute executable path and verify the executable's owner, permissions, and cryptographic hash before every launch. 6. Ensure that only the dedicated account can modify the executable, configuration, working directory, and task definition. 7. Identify processes using a verified PID file or operating-system service identity rather than broad name matching. 8. Add bounded retries, exponential backoff, and a failure threshold that disables automatic restarts and alerts the user. 9. Provide exact installation, inspection, disablement, and removal instructions for every persistent task. 10. Separate demo and live configurations. Automatic restart should be disabled for live trading by default. 11. Restrict OKX API keys to the minimum required trading permissions, disable withdrawals, use IP allowlisting where supported, and rotate keys after suspected compromise. 12. Protect `.secrets/okx.env` with restrictive filesystem permissions and explicitly exclude it from version control. 13. Log every restart attempt and trading-mode transition without recording API secrets.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This skill is explicitly designed to interact with OKX in Demo or Live mode and execute trades, yet the description lacks a clear, front-loaded warning that Live mode can place real orders with real funds. In the context of autonomous trading software, omission of that warning materially increases the risk of accidental financial loss by users who may treat the tool as research-only or sandboxed.

Description-Behavior Mismatch

Low
Confidence
82% confidence
Finding
The skill description repeatedly presents a concrete 5-agent competition setup, including a specific five-agent architecture diagram at L30-L31. However, the 'Strategies Included' section enumerates only four strategies, creating a mismatch between the claimed tournament composition and the documented behavior/configuration actually described in the file.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The file documents the 'trading-tournament' skill, but the setup instructions tell users to copy the `bybit-trading/` folder. This actively conflicts with the skill's identity and OKX-focused documentation, indicating the instructions were carried over from another project and do not match the stated intent of the current skill.

Static analysis

No suspicious patterns detected.