Back to skill

Security audit

MT5 Headless Automation

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-built for MT5 automation, but it handles broker credentials and live trading operations with broad screen capture and automatic restarts that users should review carefully before installing.

Install only on a dedicated VPS or isolated X display, preferably with a demo or read-only account first. Review the scripts before running, keep credentials out of shell history and logs, restrict file permissions, and understand that the watchdog may restart MT5 or reattach an EA during active trading.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The script captures the full X display (`import -window root`) before OCR-cropping it, which can unintentionally collect sensitive data visible on the virtual desktop such as broker credentials, account details, or unrelated application content. In this skill's context, that is more dangerous because it explicitly handles trading sessions and login material on a headless VPS.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
---
name: "mt5-headless-automation"
description: "Run MetaTrader 5 (MT5) fully headless on Linux/VPS: Wine + Xvfb + xdotool + OCR. Install, log in, attach EAs, deploy experts, monitor heartbeat and auto-restart. Built from real production experience (Vantage, 17 symbols, DRT-Axe EA). Perfect for traders who want to run EAs 24/7 without a screen. ⚠️ WARNING: runs system-level commands (wine, Xvfb, sudo apt), can restart MT5/terminate processes, and handles broker login credentials."
metadata: {"mt5-headless-automation": {"requires": {"bins": ["wine", "xvfb", "xdotool", "tesseract", "scrot", "sudo"], "files": ["~/.config/tg-alert.env"], "env": ["MT5_ACCOUNT", "MT5_PASSWORD"]}, "permissions": {"exec": ["bash", "wine", "xvfb-run", "xdotool", "import", "tesseract", "sudo"], "network": ["api.telegram.org"], "files": ["/tmp", "~/.config/tg-alert.env"], "notes": "GUI automation (xdotool) sends keystrokes to the MT5 window — verify the correct window has focus before running. Screenshots (import -window root) capture the ENTIRE display and may contain trading data, account details or other sensitive on-screen content — treat as sensitive artifacts: they are written to a private mktemp dir and auto-removed on exit. Keep keys scoped and never log them."}}}
---
Confidence
92% confidence
Finding
The skill explicitly requires and advertises sudo-based package installation and execution of system-level commands. Even if intended for legitimate setup, this materially increases risk because running privileged commands from an automation skill can modify the host, install software, or be abused to escalate impact if the skill or its companion scripts are changed or misused.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
## ⚠️ Important (read first)

- **System-level actions:** this skill installs packages (sudo apt), starts Xvfb/Wine, and runs shell scripts. Review before running on production.
- **Restarts can interrupt trading:** the watchdog auto-restarts MT5 and may terminate EA processes during active sessions — this can detach strategies or affect open positions.
- **Credentials:** broker login (terminal64.exe via Wine) uses your MT5 account/password. They are entered into the terminal and may appear in process arguments or logs — store them in env vars or a protected file, never in scripts committed to git. Use a read-only/demo account for testing.
- **Built from production experience** — but backtest/production results are historical and not guaranteed.
Confidence
90% confidence
Finding
The documentation confirms the skill performs privileged installation and process-management actions such as restarts and termination. In context, this is operationally expected, but it is still dangerous because it gives the skill host-level control that can disrupt services, alter system state, or amplify damage from mistakes or downstream script vulnerabilities.

Credential Access

High
Category
Privilege Escalation
Content
---
name: "mt5-headless-automation"
description: "Run MetaTrader 5 (MT5) fully headless on Linux/VPS: Wine + Xvfb + xdotool + OCR. Install, log in, attach EAs, deploy experts, monitor heartbeat and auto-restart. Built from real production experience (Vantage, 17 symbols, DRT-Axe EA). Perfect for traders who want to run EAs 24/7 without a screen. ⚠️ WARNING: runs system-level commands (wine, Xvfb, sudo apt), can restart MT5/terminate processes, and handles broker login credentials."
metadata: {"mt5-headless-automation": {"requires": {"bins": ["wine", "xvfb", "xdotool", "tesseract", "scrot", "sudo"], "files": ["~/.config/tg-alert.env"], "env": ["MT5_ACCOUNT", "MT5_PASSWORD"]}, "permissions": {"exec": ["bash", "wine", "xvfb-run", "xdotool", "import", "tesseract", "sudo"], "network": ["api.telegram.org"], "files": ["/tmp", "~/.config/tg-alert.env"], "notes": "GUI automation (xdotool) sends keystrokes to the MT5 window — verify the correct window has focus before running. Screenshots (import -window root) capture the ENTIRE display and may contain trading data, account details or other sensitive on-screen content — treat as sensitive artifacts: they are written to a private mktemp dir and auto-removed on exit. Keep keys scoped and never log them."}}}
---

# MT5 Headless Automation 🖥️🤖
Confidence
95% confidence
Finding
The skill handles MT5 credentials via environment variables and a local config file, and the text itself warns they may appear in process arguments, logs, screenshots, or the automated GUI flow. This creates a real credential-exposure risk because headless GUI automation and full-screen capture can inadvertently collect secrets or account data beyond the intended target.

Credential Access

High
Category
Privilege Escalation
Content
---
name: "mt5-headless-automation"
description: "Run MetaTrader 5 (MT5) fully headless on Linux/VPS: Wine + Xvfb + xdotool + OCR. Install, log in, attach EAs, deploy experts, monitor heartbeat and auto-restart. Built from real production experience (Vantage, 17 symbols, DRT-Axe EA). Perfect for traders who want to run EAs 24/7 without a screen. ⚠️ WARNING: runs system-level commands (wine, Xvfb, sudo apt), can restart MT5/terminate processes, and handles broker login credentials."
metadata: {"mt5-headless-automation": {"requires": {"bins": ["wine", "xvfb", "xdotool", "tesseract", "scrot", "sudo"], "files": ["~/.config/tg-alert.env"], "env": ["MT5_ACCOUNT", "MT5_PASSWORD"]}, "permissions": {"exec": ["bash", "wine", "xvfb-run", "xdotool", "import", "tesseract", "sudo"], "network": ["api.telegram.org"], "files": ["/tmp", "~/.config/tg-alert.env"], "notes": "GUI automation (xdotool) sends keystrokes to the MT5 window — verify the correct window has focus before running. Screenshots (import -window root) capture the ENTIRE display and may contain trading data, account details or other sensitive on-screen content — treat as sensitive artifacts: they are written to a private mktemp dir and auto-removed on exit. Keep keys scoped and never log them."}}}
---

# MT5 Headless Automation 🖥️🤖
Confidence
95% confidence
Finding
The skill handles MT5 credentials via environment variables and a local config file, and the text itself warns they may appear in process arguments, logs, screenshots, or the automated GUI flow. This creates a real credential-exposure risk because headless GUI automation and full-screen capture can inadvertently collect secrets or account data beyond the intended target.

Static analysis

No suspicious patterns detected.