Back to skill

Security audit

Wyckoff Diagnose

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill mostly matches its stated purpose, but it quietly uses a hardcoded API token and an undisclosed plaintext custom market-data server.

Review before installing. The skill appears intended for Chinese A-share technical analysis and does not show persistence or local data theft, but it should not silently route market-data requests through a plaintext custom server with an embedded token. Install only if you accept that external endpoint risk, and prefer a version that documents all providers, uses HTTPS, and loads API credentials from user-controlled configuration.

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

Warning
Location
scripts/ts_data.py:10
Finding

Hardcoded API Token Transmitted to an Undocumented Plaintext Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/ts_data.py:10-18
Vulnerability Type: Hardcoded credential and plaintext transmission to a custom service
Risk Level: Medium

Vulnerable Code

python
TOKEN = '676658a3dc1be0f7b5b2c884777d325f133b1f6f6973d4caa61b6476f854'
_http_url = 'http://140.143.209.128:5000'


def _get_pro():
    """获取初始化好的 pro 对象"""
    pro = ts.pro_api(TOKEN)
    pro._DataApi__token = TOKEN
    pro._DataApi__http_url = _http_url
    return pro

The affected method is invoked by the primary data-fetching path in scripts/diagnose.py:28-30:

python
df, name = get_quote_history_ts(
    code, start_date='20200101', end_date='20500101'
)

Technical Analysis

The source code contains a reusable API token and directly assigns it to a private field of the Tushare client. It also overrides the client's service URL with the bare-IP endpoint http://140.143.209.128:5000.

The use of plain HTTP provides neither transport confidentiality nor server authentication. Consequently, the token and request data may be observable by an on-path attacker, while request or response content may be modified in transit. Because the endpoint supplies historical market data used by the scoring engine, tampered responses can influence the generated stock ratings and recommendations.

The custom endpoint is not disclosed in SKILL.md, which describes Efinance as the data-fetching provider. The implementation instead prioritizes this custom Tushare-compatible service before Baostock and Efinance.

Attack Path

  1. A user invokes scripts/diagnose.py with one or more stock codes.
  2. diagnose_with_retry() attempts the Tushare adapter before the other providers.
  3. _get_pro() loads the embedded token and replaces the client's endpoint with the plaintext custom service.
  4. The client sends the credential and requested stock information toward that endpoint without TLS protec ...[truncated 1048 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke or rotate the exposed token.
  2. Remove credentials from source control and load them from an environment variable or protected secret manager.
  3. Remove the assignment to the private _DataApi__http_url field and use the official Tushare HTTPS endpoint.
  4. If a proxy is operationally required, use an authenticated HTTPS hostname with valid certificate verification rather than a plaintext bare-IP URL.
  5. Make any alternative endpoint an explicit, validated configuration option rather than silently overriding private client state.
  6. Document every remote provider, destination, and transmitted data field in SKILL.md.
  7. Restrict the replacement token to the minimum required permissions, apply usage limits where supported, and monitor it for unauthorized access.
  8. Add automated secret scanning and a policy check that rejects plaintext HTTP service endpoints in future changes.
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 (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A description-behavior mismatch is dangerous because it causes reviewers and users to trust a benign-looking stock-analysis skill while the implementation reportedly lacks the advertised analysis logic and instead uses an undeclared external HTTP endpoint with an embedded API token. Hidden network behavior and hardcoded credentials can enable unauthorized data exfiltration, supply-chain abuse, and execution of unreviewed logic outside the declared skill boundary.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

Overly broad trigger phrases can cause the skill to activate in unrelated conversations, increasing the chance that users receive unsolicited trading guidance or that the skill intercepts prompts not intended for it. In a finance context, accidental activation is more risky because outputs may influence financial decisions without clear user intent or informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Providing trading recommendations without a financial-risk warning is unsafe because users may interpret ratings like '强烈推荐' and '回调买入' as personalized or reliable investment advice. In the context of a stock-diagnosis skill, this materially increases the likelihood of harmful reliance, especially when the skill claims precise ratings and buy/avoid suggestions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings and descriptions entirely in Chinese, including the module header and all CLI-facing help/output. Under the policy rule, forcing a specific language without user opt-in is a locale/language policy violation because users are not offered any language selection or fallback.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file hardcodes a Tushare API token and overrides the SDK to use a custom remote HTTP endpoint instead of the default trusted service path. This exposes a credential in source code and silently sends market-data requests to an unexpected server, creating risks of credential leakage, traffic interception, response tampering, and undisclosed third-party data access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill contains a hardcoded API credential and makes outbound requests to a non-obvious HTTP endpoint without any user-facing disclosure. In a stock-diagnosis skill, hidden external data exfiltration and undeclared network behavior are more concerning because users reasonably expect analysis logic, not silent transmission to an arbitrary remote host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code contains natural-language descriptions and many user-facing result strings entirely in Chinese, which effectively imposes a specific language on users. The policy allows locale constraints only when they are explicitly justified or when users are offered a language choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring and function docstring are written entirely in Chinese, and the code later renames output columns to Chinese labels. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative language or locale choice is provided.

Content

No source excerpt is available for this finding.