Back to skill

Security audit

小果基金量化分析助手

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate quant-finance toolkit, but it handles credentials and destructive strategy actions in ways users should review carefully before installing.

Install only if you trust the server you configure and are comfortable sending account credentials to it. Prefer HTTPS, avoid logging full request URLs, use low-privilege or throwaway credentials, and do not invoke deletion, simulated/community strategy, or custom-code endpoints without explicit review.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
SKILL.md:5684
Finding

Credentials and financial queries are transmitted in plaintext URL query parameters

Content
View full analysis
Dict[str, Any]: """Build request parameters and automatically add authentication data.""" params = { 'user': self.user, 'password': self.password, 'auth_code': self.auth_code, } params.update(kwargs) return params def _request( self, endpoint: str, params: Dict[str, Any], method: str = 'GET', timeout: Optional[int] = None, verbose: bool = True ) -> Dict[str, Any]: if timeout is None: timeout = self.timeout url = f"{self.base_url}{endpoint}" clean_params = {k: v for k, v in params.items() if v is not None} try: if method.upper() == 'GET': response = self.session.get( url, params=clean_params, timeout=timeout ) else: response = self.session.post( url, params=clean_params, timeout=timeout ) if verbose: print(f"Request URL: {response.url[:100]}...") print(f"Status code: {response.status_code}") response.raise_for_status() return response.json() ``` ### Technical Analysis The API base URL is forcibly constructed with `http://`, so transport encryption and server authentication are not provided. The `_get_params()` method systematically adds the account password and authorization code to every authenticated request. The default request method is GET, and `requests` serializes `clean_params` into the URL query string. Consequently, credentials and operation parameters can be exposed through: - Network traffic inspe ...[truncated 2034 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:7005
Finding

Destructive strategy-management operations use GET and enable confirmation by default

Content
View full analysis
Dict[str, Any]: params = self._get_params( user=user, st_type=st_type, st_name=st_name, open_show=open_show ) return self._request('/del_moni_trader_data', params) def del_all_moni_trader_data( self, user: str = "\u81ea\u5df1\u4fe1\u606f", confirm: str = "\u662f" ) -> Dict[str, Any]: params = self._get_params( user=user, confirm=confirm ) return self._request('/del_all_moni_trader_data', params) def del_all_moni_trader_data_sq( self, user: str = "\u81ea\u5df1\u4fe1\u606f", confirm: str = "\u662f" ) -> Dict[str, Any]: params = self._get_params( user=user, confirm=confirm ) return self._request('/del_all_moni_trader_data_sq', params) ``` The `_request()` method defaults to GET: ```python def _request( self, endpoint: str, params: Dict[str, Any], method: str = 'GET', timeout: Optional[int] = None, verbose: bool = True ) -> Dict[str, Any]: ``` ### Technical Analysis Deletion changes server-side state but is performed through the client's default GET behavior. GET requests are expected to be safe and idempotent and may be logged, cached, prefetched, retried, copied, or replayed by infrastructure and users. The bulk-deletion methods also default `confirm` to an affir ...[truncated 2115 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:7295
Finding

Authenticated API exposes remote submission of caller-controlled Python source

Content
View full analysis
Dict[str, Any]: """Retrieve custom data.""" params = self._get_params(name=name, func=func) return self._request('/get_user_def_data', params) ``` ### Technical Analysis The method accepts arbitrary Python source through the `func` parameter and submits it to the remote `/get_user_def_data` endpoint. Unlike a constrained market-data query, this interface allows imports, function calls, variable assignments, and other Python syntax. The remote server implementation is not included in the audited project, so it cannot be confirmed that the submitted source is directly passed to `exec()`, `eval()`, or an equivalent interpreter. However, the client deliberately creates a general Python-source submission channel, and the default value demonstrates executable Python statements rather than a restricted expression format. If the server executes this source without a hardened sandbox and strict authorization, the interface could permit access beyond the legitimate quantitative-data task, including filesystem access, environment-secret discovery, internal network requests, resource exhaustion, or modification of server-side state. The risk is amplified by the plaintext credential issue: stolen credentials could allow an attacker to reach this interface as an authenticated user. ### Attack Path 1. An attacker obtains valid API credentials, potentially through the plaintext URL exposure identified elsewhere in this report, or already controls an authorized account. 2. The attacker calls `get_user_def_data()` with crafted Python source in `func`. 3. The client sends the source and credentials to `/get_u ...[truncated 1488 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (64)

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

get_user_def_data sends arbitrary user-supplied code (func) to a remote endpoint for execution, effectively exposing remote code execution through the skill. In the context of a fund analysis assistant, this capability is unjustified and highly dangerous because it could be used to run arbitrary commands, access sensitive data, pivot into backend systems, or abuse compute resources.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个较完整的基金量化分析助手,覆盖历史行情、因子数据、策略回测、组合分析等多项核心能力。但该代码块的核心功能是:从本地 parquet/excel/json 文件读取基金/可转债及指数数据,调用 xg_factor 中的因子函数批量计算因子,并将结果保存为 parquet、excel、json。它确实与“基金因子数据”部分相关,也会处理基金代码列表,因此和基金量化分析存在一定关联;但从代码本身看,没有实现策略回测、组合分析,也没有提供面向用户的历史行情分析接口。相反,代码还包含对可转债的处理,说明其覆盖对象并非仅限基金。整体上,声明比实际代码更宽、更像完整分析平台,而实际代码只是其中的一个因子计算子模块,因此存在明显描述-行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description presents a fund quant assistant with core functions around fund historical行情数据, fund factor data, strategy backtests, and portfolio analysis. The supplied code instead is a standalone indicator/formula library centered on technical analysis primitives and many Tongdaxin-style indicators (MACD, RSI, KDJ, BOLL, SAR, DMI, etc.), plus some trade-signal functions and a parser that converts Tongdaxin formulas to Python. While such utilities could support quantitative analysis in a broader sense, this chunk is not fund-specific and does not implement the declared core product capabilities like data retrieval, factor-data handling, portfolio analysis, or backtesting. Therefore the actual behavior materially differs from the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is presented as a fund quant assistant, yet the bundled client exposes much broader data-access surfaces including stocks, convertible bonds, minute-level data, financial statements, and index APIs. This hidden expansion materially increases attack surface and user risk because operators may approve or invoke the skill under a narrower trust assumption than its true capability set.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code supports creation, publication, execution, and deletion of simulated and community strategies, which are remote state-changing operations not disclosed by a read-mostly analysis skill description. Hidden mutating operations are dangerous because they can alter remote account state, publish data, or destroy user content when the user expects only analytics.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill documents destructive deletion endpoints without user warnings, guardrails, or confirmation semantics. In a skill framed as analysis/backtesting, the lack of warning materially increases the chance of accidental destructive use and masks the severity of those actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Bulk deletion endpoints for all simulated or community strategy data provide destructive account-management functionality unrelated to the stated analysis purpose. If invoked accidentally or maliciously, they can cause irreversible loss of remote user data at account scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a fund quantitative analysis assistant providing factor data and related analytics. In cacal_all_stock_factor_single, the branch guarded by use_async_io is part of the advertised all-stock factor calculation flow, but it merely calls get_stock_data and saves the raw dataframe to 全部因子数据 without invoking any factor functions, so the produced output does not match the claimed factor-analysis behavior.

Content

No source excerpt is available for this finding.

Whitespace Padding

High
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · references/xg_factor.txt (reported line 2029)May include surrounding context.

text
'''逆势操作 - AL'''
        cdp_val, ah_val, nh_val, nl_val, al_val = CDP_STD(CLOSE=self.C, HIGH=self.H, LOW=self.L)
        return al_val

Whitespace Padding

High
Category
Prompt Injection
Confidence
80% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · scripts/xg_factor.py (reported line 2029)May include surrounding context.

python
'''逆势操作 - AL'''
        cdp_val, ah_val, nh_val, nl_val, al_val = CDP_STD(CLOSE=self.C, HIGH=self.H, LOW=self.L)
        return al_val

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

In the so-called async I/O branch, the code preloads stock data with get_stock_data() and then immediately writes that raw dataframe to 全部因子数据 instead of computing factors first. This silently produces incorrect outputs under filenames that imply completed factor calculations, creating a data-integrity failure that can poison downstream backtests, portfolio analysis, and trading decisions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
72% confidence
Finding

The skill exposes broad code-like capabilities and embeds extensive Python examples, but the manifest does not declare any tool scope or operational boundaries. In practice this can mislead users and hosting platforms about what the skill may access or modify, weakening least-privilege controls and reviewability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs users to supply user, password, and auth_code to a remote HTTP service, but it does not warn that these credentials and all query parameters are transmitted off-box. This is especially risky because the client uses plain http:// in base_url, exposing credentials and sensitive requests to interception if used over untrusted networks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Single-strategy deletion still introduces unnecessary destructive capability into an analysis-oriented skill. Even when limited to one strategy, accidental or unauthorized invocation can remove remote user assets or records and erode trust in the skill's safety model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file includes user-facing natural-language content such as docstrings, comments, and output labels entirely in Chinese, beginning with the class description and continuing throughout the skill. Because the file does not offer a user language/locale choice or explain that it is intentionally limited to a Chinese-speaking context, it can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

Multiple comments, docstrings, and user-visible print messages are exclusively in Chinese, with no option for users to select another language. This can violate language/locale policy where skills must not force a specific language absent documented user choice or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code writes computed factor data to parquet files, creating directories as needed, and later overwrites outputs again in force-recalculation mode. While this behavior may be part of the tool's purpose, these write/overwrite actions lack a clear user-facing disclosure at the point of execution in this path.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

get_bond_stock is documented as returning convertible bond codes, and _get_stock_list is documented as obtaining a stock list, yet it concatenates fund codes with convertible bond codes into the same processing universe. This diverges from the manifest's fund-focused scope and from the function's own stated purpose of calculating stock/fund factor data, broadening behavior beyond the described asset class without clear declaration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The function params_data performs arbitrary local file reads and writes using caller-supplied paths, which expands the skill from quantitative analysis into filesystem transformation. In an agent context, this can overwrite local files or process unintended sensitive files if untrusted input controls test or to_path, especially since there is no path restriction, validation, or sandboxing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file transformation utility is not clearly justified by the stated fund-analysis purpose, which makes the unexpected filesystem capability higher risk in an agent skill. Hidden or unnecessary file access increases the chance that a higher-level workflow could be induced to read or overwrite arbitrary local files outside the intended analytics scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code performs local file reads and writes without any user-facing disclosure, confirmation, or logging, which is risky for an agent-executed skill. Silent filesystem side effects can surprise users, destroy data, or expose sensitive files when the function is invoked as part of a larger automated workflow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function declares dependency ['KDJ_J'] but directly reads closePrice, highestPrice, and lowestPrice. In a data-pipeline or permission-gated skill, this breaks the dependency contract and can cause hidden access to undeclared fields, incorrect feature loading, or runtime failures when only the declared indicator is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function advertises dependencies ['VR','turnoverVol'] but recomputes VR using closePrice, which is undeclared. This can bypass schema/authorization assumptions and lead downstream systems to omit required data, producing silent logic errors or crashes in financial analysis workflows.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function says it is OBV6 and declares dependency ['OBV6'], but it recalculates the indicator from closePrice and turnoverVol, neither of which are declared. This hidden raw-field access can break least-privilege assumptions and cause inconsistent results depending on what the caller supplies.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function claims to represent BBIC but both the formula and dependency contract are inconsistent with the implementation, which reads closePrice despite declaring only ['BBIC']. In quantitative finance tooling, such mismatches can silently distort signals, defeat reproducibility, and undermine auditability of trading logic.

Content

No source excerpt is available for this finding.