Back to skill

Security audit

financial-market-data

Security checks for vulnerabilities and agentic risk

Overview

This financial data skill is mostly purpose-aligned, but it embeds a reusable API key and has data-quality and dependency risks users should review before installing.

Install only if you are comfortable with this skill contacting external financial-data providers with requested symbols. The embedded Eastmoney key should be treated as exposed and replaced with a user-provided secret before use; also prefer pinned dependencies or a lockfile, and verify intraday data correctness before relying on it for trading, alerts, or financial decisions.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
python/template.py:57
Finding

Hardcoded Eastmoney API Credential Exposed in Source and Metadata

Content
View full analysis

Vulnerability Details

File Location: python/template.py:57-67; duplicated in skill.yaml:12-16
Vulnerability Type: Hardcoded reusable API credential
Risk Level: High

Vulnerable Code

python/template.py:57-67:

python
api_key = "mkt_HFeitkf4UQNDF8rpr6wZMVfweIxmPegsR1jJK0kF0_I"
url = "https://mkapi2.dfcfs.com/finskillshub/api/claw/query"

payload = {
    "toolQuery": json.dumps({
        "func": "get_quote_list_ts",
        "params": [symbols, 1]
    })
}
headers = {"Content-Type": "application/json", "apiKey": api_key}
resp = requests.post(url, json=payload, headers=headers, timeout=15)

skill.yaml:12-16:

yaml
token_required:
  - name: "东方财富MX API"
    key: "mkt_HFeitkf4UQNDF8rpr6wZMVfweIxmPegsR1jJK0kF0_I"
    usage: "A股/港股/美股实时行情查询"

Technical Analysis

A reusable Eastmoney MX API credential is embedded directly in both executable source code and public Skill metadata. Any person or process that can read, clone, cache, package, or inspect the Skill can recover the credential without authorization.

The implementation automatically places the credential in the apiKey HTTP header and sends it to the documented HTTPS endpoint. Transmitting an API credential to its intended provider is necessary for authenticated market-data access, but distributing the provider credential inside the Skill is not necessary and violates least-secret-exposure principles.

The stock-symbol query supplied through symbols is also transmitted to Eastmoney. That transmission is consistent with the declared financial-data functionality, and the reviewed code does not collect environment variables, private keys, local files, or unrelated user information.

Attack Path

  1. An attacker obtains the Skill package or reads its repository, installation directory, package cache, or generated metadata.
  2. The attacker extracts the plaintext token from skill.yaml or `python/template.p ...[truncated 933 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed Eastmoney API token.
  2. Remove the token from python/template.py, skill.yaml, repository history, release archives, caches, and published Skill packages.
  3. Require each user to supply a separately issued credential through an environment variable or supported secret manager:
    python
    import os
    
    api_key = os.environ.get("EASTMONEY_API_KEY")
    if not api_key:
        raise RuntimeError("EASTMONEY_API_KEY is not configured")
    
  4. Do not place secret values in Skill metadata. Metadata should declare only the required secret name.
  5. Apply server-side least privilege, endpoint restrictions, quota limits, expiration, and rotation policies to replacement credentials.
  6. Avoid logging request headers or exception objects that could expose the token.
  7. Add automated secret scanning to development and release workflows.
  8. Clearly disclose that stock symbols and related query parameters are sent to Eastmoney when this function is invoked.

T08 · Insecure Dependencies

Warning
Location
python/pyproject.toml:6
Finding

Unpinned Third-Party Dependencies Create Supply-Chain Exposure

Content
View full analysis

Vulnerability Details

File Location: python/pyproject.toml:6-12; installation guidance in SKILL.md:35-39
Vulnerability Type: Unrestricted dependency updates without a reviewed lockfile or integrity verification
Risk Level: Medium

Vulnerable Code

python/pyproject.toml:6-12:

toml
dependencies = [
    "tickflow>=0.1.17",
    "akshare>=1.18.51",
    "baostock>=0.8.9",
    "pytdx>=1.72",
    "requests>=2.33.0",
    "pandas>=3.0.0",
]

SKILL.md:35-39:

bash
cd ~/.openclaw/workspace
uv sync
bash
pip install tickflow akshare baostock pytdx requests pandas

Technical Analysis

The package manifest specifies only lower version bounds, and the documented direct pip install command contains no version constraints at all. No reviewed lockfile or package hashes were present in the audited directory.

Consequently, installations performed at different times can resolve to materially different dependency versions. Package installation can execute package-controlled build hooks, while imported dependencies execute with the same operating-system privileges as the agent process. A future compromised, malicious, or simply incompatible release could therefore alter installation-time or runtime behavior after this Skill has been reviewed.

The audit did not establish that any currently named dependency is malicious. This finding concerns the absence of deterministic resolution and integrity controls, rather than a confirmed malicious package.

Attack Path

  1. A listed package, transitive dependency, maintainer account, or package-distribution channel is compromised, or a harmful future version is published.
  2. A user follows the documented unpinned installation command or resolves the lower-bound-only manifest without a trusted lockfile.
  3. The package manager selects the newly available release.
  4. Package-controlled code runs during build, ...[truncated 879 chars]
Remediation
View remediation

Remediation Suggestions

  1. Generate and commit a reviewed lockfile that fixes all direct and transitive dependency versions.
  2. Pin exact versions for reproducible releases instead of relying solely on lower bounds.
  3. Use package hashes or an equivalent integrity-verification mechanism where supported.
  4. Update SKILL.md so installation uses the reviewed lockfile rather than an unconstrained pip install command.
  5. Use only trusted package indexes and disable unintended fallback indexes to reduce dependency-confusion exposure.
  6. Review release provenance, maintainer changes, and security advisories before updating dependencies.
  7. Test upgrades in an isolated environment and update pins through a controlled review process.
  8. Install and execute the Skill as a non-privileged user in a constrained environment with only the network and filesystem access required for market-data retrieval.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The function advertises intraday minute-level market data but actually calls the daily K-line endpoint and transforms daily OHLC rows into fake minute records by differencing cumulative fields. In a financial data skill, this is dangerous because downstream trading, alerting, or analytics logic may make decisions on materially incorrect market data while believing it is minute-resolution intraday data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The markdown instructions and all operational guidance are written entirely in Chinese, while the file title is in English and there is no indication that users can choose another language or locale. The policy explicitly calls for flagging language or locale constraints when the skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 280)May include surrounding context.

}) } headers = {"Content-Type": "application/json", "apiKey": api_key} resp = requests.post(url, json=payload, headers=headers, timeout=15) data = resp.json()

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module description is entirely in Chinese ("金融行情数据获取模板"), which indicates a fixed language choice in the skill's natural-language surface. There is no indication that the user can choose another language or that the locale restriction is documented and justified as region-specific.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The function sends caller-supplied symbols to an external third-party endpoint and includes a hardcoded API key in the request headers. This creates two risks: sensitive user/query data may be transmitted off-platform without clear consent, and the embedded credential can be extracted and abused by anyone with code access.

Content

Scanner excerpt · python/template.py (reported line 67)May include surrounding context.

python
})
    }
    headers = {"Content-Type": "application/json", "apiKey": api_key}
    resp = requests.post(url, json=payload, headers=headers, timeout=15)
    return resp.json()

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is written entirely in Chinese and does not indicate that the skill is region-specific or that users may choose another language. This can violate language/locale policy because it implicitly constrains interaction to a specific language without opt-in.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The manifest specifies requests with a lower-bound range (>=2.33.0) rather than a pinned or constrained safe version, so the actual installed version may vary across environments and could include a vulnerable release if resolution changes or mirrors are compromised. In a financial market data skill, network-facing HTTP usage is central functionality, which makes dependency hygiene more important because a requests flaw could expose credentials, affect TLS verification behavior, or leak sensitive connection data.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
83% confidence
Finding

The manifest leaves pandas unpinned with a broad minimum version, so the resolved package version is not reproducible and may unexpectedly include a release with known security concerns or disputed unsafe deserialization behavior. While pandas is less directly exposed than an HTTP client here, financial data tooling often ingests external files and datasets, which can increase the relevance of parser and deserialization issues.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Accept-Language header is hard-coded to "zh-CN,zh;q=0.9", which imposes a specific language/locale preference. The file does not indicate that this locale is optional, user-configurable, or required for a documented region-specific compliance reason.

Content

No source excerpt is available for this finding.