Back to skill

Security audit

Finxdata Simulated Trading

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its simulated-trading purpose, but it needs review because its Trading Key can be sent to any configured API URL.

Install only if you are comfortable letting an agent manage your FinXData simulated-trading account. Store the Trading Key in the environment, do not paste it into chat, avoid custom base URLs unless you fully trust the endpoint, and review any write action such as orders, cancellations, watchlist edits, account creation, or reset before it runs.

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

Error
Location
scripts/finxdata_simtrading.py:57
Finding

Unrestricted Base URL Allows Disclosure of the Privileged Trading Key

Content
View full analysis
Any: if not self.trading_key: raise FinXDataClientError( "缺少模拟交易 Key,请设置 FINXDATA_TRADING_KEY", code="MISSING_TRADING_KEY", ) params = { key: _query_value(value) for key, value in (query or {}).items() if value is not None } url = f"{self.base_url}{path}" if params: url = f"{url}?{urllib.parse.urlencode(params)}" data = None headers = { "Accept": "application/json", "User-Agent": DEFAULT_USER_AGENT, "X-FINXDATA-TRADING-KEY": self.trading_key, } ``` ### Technical Analysis The client obtains its API destination from the `base_url` constructor argument, `FINXDATA_BASE_URL`, or the legacy `FINDATA_BASE_URL` environment variable. It performs no validation of the resulting URL before attaching the privileged `X-FINXDATA-TRADING-KEY` header. In particular, the implementation does not: - Require the HTTPS scheme. - Verify that the destination host is an approved FinXData host. - Reject embedded URL credentials, unexpected ports, or malformed endpoint components. - Establish a trust relationship between a custom endpoint and the credential being transmitted. - Explicitly prevent credential forwarding during cros ...[truncated 1765 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (18)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
在本 Skill 目录运行 `python3 scripts/finxdata_simtrading.py`。脚本输出 JSON;接口或配置出错时以非零状态退出。客户端使用稳定的 FinXData Agent `User-Agent`,避免 Python urllib 默认签名触发生产环境 Cloudflare 拦截。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a Python script that uses environment secrets and makes network requests, but the skill file declares no explicit tool scope such as allowed tools or permissions. Without a clear least-privilege boundary, an agent runtime may grant broader access than intended, increasing the risk of secret exposure or unintended external actions if the skill or its inputs are abused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI exposes orders cancel as an immediate state-changing action without any additional confirmation, dry-run mode, or user-facing warning. In a trading skill, even simulated trading operations can materially alter account state and downstream analyses, so accidental or prompt-induced cancellations are a real safety issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file presents its description and multiple runtime error messages exclusively in Chinese, with no mechanism for language selection or opt-in. This can violate a language/locale policy when skills are expected to avoid forcing a specific language on users.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.