Back to skill

Security audit

VBrokers Trading

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-built for VBrokers trading, but it gives an agent live account and order-changing authority with weak warnings and few safety controls.

Install only if you intentionally want an agent to interact with a live VBrokers gateway. Treat login, place_order, cancel_order, cancel_all_orders, and stop-loss automation as real trading actions; require your own explicit confirmation, limits, and review before use, and avoid running the script directly where account output may be logged.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/vbrokers_client.py:29
Finding

Hardcoded AES Key and Unauthenticated Credential Transport

Content
View full analysis
str: aes_key = base64.b64decode(AES_KEY_B64) cipher = AES.new(aes_key, AES.MODE_ECB) padded = pad(plain_password.encode("utf-8"), AES.block_size) encrypted = cipher.encrypt(padded) return base64.b64encode(encrypted).decode("utf-8") def call(path: str, params: dict = None) -> dict: body = {"timeout_sec": TIMEOUT_SEC} if params: body["params"] = params data = json.dumps(body).encode("utf-8") req = urllib.request.Request(f"{GATEWAY_URL}{path}", data=data, method="POST") req.add_header("Content-Type", "application/json") try: resp = urllib.request.urlopen(req, timeout=TIMEOUT_SEC + 2) return json.loads(resp.read().decode("utf-8")) except urllib.error.HTTPError as e: return {"ok": False, "err": f"HTTP {e.code}: {e.reason}", "data": None} except Exception as e: return {"ok": False, "err": str(e), "data": None} def trade_login(password: str) -> dict: encrypted_pwd = encrypt_password(password) return call("/trade/TradeLogin", {"password": encrypted_pwd}) ``` ### Technical Analysis The client embeds the AES key used to encrypt the trading password directly in its source code. Anyone who obtains the Skill can recover the key by Base64-decoding `AES_KEY_B64`. The use of AES-ECB provides no semantic security between identical plaintext blocks, while the final Base64 operation is only an encoding step and offers no additional confidentiality. The encrypted password is submitted to `http://127.0.0.1:11111` without TLS or application-level authentication of the gateway. Restricting the destination to loopback substantially limi ...[truncated 1659 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/vbrokers_client.py:350
Finding

Automatic Disclosure of Private Financial Data Through Standard Output

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:14
Finding

Unpinned Cryptographic Runtime Dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The documentation overstates coverage and reliability, claiming broad endpoint support and implying stop-loss support tied to real-time data when the referenced implementation apparently only supports a subset and uses non-real-time position data. In a trading skill, this mismatch can cause users or agents to make financial decisions based on incorrect assumptions about market coverage, quote freshness, or automation safety.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation presents login, funds checks, quote retrieval, and live order placement as a simple quick-start flow without any explicit warning that these are real brokerage actions with financial consequences. In this context, omission of a trading-risk warning makes accidental or uninformed execution materially more dangerous, especially for autonomous agents or copied example code.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The stop-loss example shows unattended logic that can automatically trigger a market sell order, yet it does not warn about delayed data, slippage, after-hours conditions, or the risk of autonomous liquidation. In a live trading environment, this can directly cause unintended execution and financial loss if quote assumptions or market conditions are wrong.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This client exposes direct order placement and cancellation primitives against a live localhost trading gateway with no confirmation, safety interlock, dry-run mode, market allowlist, or explicit risk acknowledgment. In the context of an automation skill for real brokerage operations, any accidental invocation, prompt misuse, or upstream agent error can immediately submit or cancel real trades, causing financial loss.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and demonstrates network-capable behavior against a localhost trading gateway but does not declare any tool scope or permissions boundaries. In a trading context, undeclared network access is especially risky because the skill can authenticate sessions, query funds, and place or cancel live orders without clear runtime guardrails or least-privilege constraints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The 'Use when' language is broad enough to trigger this skill for many generic trading-related requests, including ones where the user may only want analysis or education rather than live brokerage interaction. Because this skill can connect to an authenticated local gateway and perform state-changing actions, overbroad invocation increases the chance of accidental high-risk use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The cancel-all-orders example exposes a broad destructive action without warning that it can wipe all pending orders in a market, including intentionally staged entries or exits. In a brokerage automation context, a bulk cancellation primitive should be treated as dangerous because accidental invocation can disrupt trading strategies and risk controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The authentication section instructs the caller to submit an encrypted trading password but provides no warning about secure credential handling, storage, or exposure risks. Even though AES-ECB is part of the upstream API design, the lack of guidance may lead implementers to log, persist, or mishandle brokerage credentials, increasing the chance of account compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This section documents live trading operations such as placing, cancelling, and batch-cancelling orders without any explicit warning that these actions can affect a real brokerage account and cause immediate financial loss. In the context of an automation skill for a localhost trading gateway, omission of safety and confirmation guidance materially increases the risk of accidental or overly broad order execution by downstream agents or users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Natural-language content throughout the module, including the top-level docstring, function docstrings, comments, and console output, is written in Chinese only. Under the stated policy, forcing a specific language without user choice is a locale/language policy violation unless clearly justified or optional.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring and error/note text in check_stop_loss state that real-time quote APIs require a push/WebSocket protocol and that HTTP does not support direct real-time price queries. However, earlier in the same file get_quote and get_quotes_batch are documented and implemented as HTTP real-time quote queries via /hq/BasicQot, creating a direct contradiction in the skill's own documentation about what the code can do.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.