Back to skill

Security audit

freeStockLIneskill

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real public A-share market-data skill, but it needs review because parts of its networking bypass configured proxy controls and one fallback uses plain HTTP.

Install only if you are comfortable with the skill making outbound requests to multiple public financial-data providers. Avoid using it in environments that require proxy-based monitoring or strict egress controls unless the proxy-bypass behavior is removed or sandboxed, and treat any data returned from the HTTP fallback or best-effort sources as lower-confidence public market data rather than trading advice.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/runtime/freestocklineskill_runtime/sources.py:1405
Finding

Process-Wide Proxy and Egress-Control Bypass

Content
View full analysis
Any: sink = io.StringIO() proxy_names = ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "http_proxy", "https_proxy", "all_proxy", "NO_PROXY", "no_proxy"] env = os.environ saved = {name: env.get(name) for name in proxy_names} for name in proxy_names: if name.lower() == "no_proxy": env[name] = "*" else: env.pop(name, None) try: with redirect_stdout(sink), redirect_stderr(sink): return func(*args, **kwargs) finally: for name, value in saved.items(): if value is None: env.pop(name, None) else: env[name] = value ``` ### Technical Analysis The `_quiet_call` helper removes all standard HTTP, HTTPS, and generic proxy environment variables and sets both `NO_PROXY` variants to `*` before invoking AKShare or efinance functions. This behavior forces supported networking libraries to attempt direct connections instead of respecting proxy settings established by the user, runtime, container, or organization. Such proxy settings may provide destination filtering, authentication, traffic inspection, audit logging, or network isolation. Bypassing them is unnecessary for the Skill's declared market-data functionality and exceeds the minimum network behavior needed to perform the requested queries. The mutation affects `os.environ`, which is process-global rather than local to the function call. In a multithreaded or shared Agent runtime, unrelated code can observe the modified environment and make direct outbound requests during the affected interval. The `finally` block restores the original values after ...[truncated 1832 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/runtime/freestocklineskill_runtime/sources.py:566
Finding

Unauthenticated Financial Data Retrieval Over Plain HTTP

Content
View full analysis
Tuple[List[Dict[str, Any]], str]: if page in cache: return cache[page] response = self.session.get(url_template.format(page), headers=headers, timeout=self.timeout) ``` ### Technical Analysis The 10jqka stock money-flow fallback sends requests to `http://data.10jqka.com.cn` and also uses an HTTP Referer. Plain HTTP provides neither transport encryption nor server authentication. A network observer can see the requested endpoint, page numbers, timing, headers, and other query metadata. More importantly, an on-path attacker can modify the HTML response before it reaches the Skill. The response is subsequently decoded and parsed by `pandas.read_html`, and matching rows are returned as financial data. There is no cryptographic integrity check or independent validation of the returned values. The transmitted information consists primarily of public market-query me ...[truncated 1834 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-to-code mismatch. The description promises a full-featured free market data query skill for A-share ecosystem data, but the provided code chunk is only minimal package metadata. It does not implement any of the declared querying capabilities, resource access, or behavior. No undeclared harmful behavior is present; the mismatch is that the actual code lacks the declared primary purpose entirely.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill advertises and instructs use of a Python CLI that queries multiple external market-data sources, but the manifest does not declare any explicit tool scope or allowed permissions. In an agent ecosystem, this weakens operator visibility and policy enforcement around network and environment access, making unintended outbound requests or misuse harder to constrain and audit.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation text is very broad and tells the agent to route essentially any stock-related natural-language request into this skill, while also saying '不要猜接口,直接把用户原话交给 smart-query'. In agent settings, broad triggers can cause over-invocation, unnecessary transmission of user prompts to code paths with network access, and accidental handling of requests that should have been answered locally or rejected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The default prompt begins with an English-only instruction ('Use $freestocklineskill...') while the surrounding skill description is Chinese and there is no indication the user can choose their preferred language. This can violate language/locale policy by imposing a specific language without opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill enables implicit invocation for broad stock-data requests without defining narrowly scoped triggers, so the agent may auto-run the skill on loosely related user input. Because the default prompt directs an automatic CLI call using raw user text, this increases the chance of unintended tool execution, surprising behavior, and expanded attack surface if downstream components mishandle input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire capability matrix and response guidance are written only in Chinese, including directives like '回答口径', with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file’s natural-language instructions and descriptions are entirely in Chinese, and there is no indication that the user can opt into another language or that the skill is intentionally restricted to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The routing table contains broad trigger terms such as “榜”, “最高”, “最低”, and generic finance words that can match many ordinary user requests and send them to an unintended tool path. In an agent setting, overly permissive natural-language routing can cause incorrect data-source selection, unexpected external requests, and misleading outputs, especially when multiple finance intents overlap.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill guidance and examples are entirely in Chinese, which effectively imposes a specific language/locale on users and integrators. The file does not state that the skill is China-market-specific nor offer an explicit language choice or opt-in, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction '这些问法都应该优先走' combined with a generic smart-query wrapper creates an overly broad routing rule that may capture many loosely related user prompts without sufficient validation or scope checks. In an agent setting, broad activation increases the chance of misrouting requests, causing the skill to answer outside its intended boundaries or to present finance-related outputs when the user asked for something else.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language responses in the unsupported-request path are hard-coded in Chinese, which imposes a specific language on users regardless of their locale or preference. This is a policy concern because the file does not offer any language choice or indicate that the skill is intentionally region- or language-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

When entity resolution fails, the CLI returns user-facing error text and hints only in Chinese. Because the file provides no language-selection mechanism or documented locale restriction, this constitutes a language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language description is written as an instruction that the agent should use this endpoint as the default and pass the user's original words, but it is presented only in Chinese. This creates a language-policy concern because the skill text implicitly assumes a specific language/locale without offering the user or agent any language choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file routes requests almost entirely through Chinese keywords, aliases, and phrases such as stock names, market terms, and conversational triggers. That effectively forces a specific language/locale behavior without any visible opt-in or documented alternative handling, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/runtime/freestocklineskill_runtime/sources.py (reported line 497)May include surrounding context.

python
for page in range(1, 61):
            params = dict(base_params)
            params["pn"] = str(page)
            payload = self._json_get("https://push2delay.eastmoney.com/api/qt/clist/get", params, referer="https://data.eastmoney.com/")
            data = payload.get("data") or {}
            rows = data.get("diff") or []
            total = _to_int(data.get("total")) or total

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This skill makes outbound requests over plain HTTP to a third-party service, exposing requests and responses to interception or tampering by network attackers. In this code path, the insecure fetch is combined with generated anti-bot headers and parsed HTML, so manipulated responses could poison returned data or trigger unsafe downstream behavior.

Content

Scanner excerpt · scripts/runtime/freestocklineskill_runtime/sources.py (reported line 566)May include surrounding context.

python
board = {"3d": "3", "5d": "5", "10d": "10", "20d": "20"}.get(period)
        path = "board/%s/field/code/order/asc/page/{}/ajax/1/free/1/" % board if board else "field/code/order/asc/page/{}/ajax/1/free/1/"
        url_template = "http://data.10jqka.com.cn/funds/ggzjl/%s" % path
        js_code = py_mini_racer.MiniRacer()
        js_code.eval(_get_file_content_ths("ths.js"))
        headers = {

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

The Referer and Host context show continued dependence on a plain-HTTP 10jqka workflow, reinforcing that this source operates without transport security. Even if only public market data is queried, man-in-the-middle tampering can falsify results and undermine trust in the agent's output.

Content

Scanner excerpt · scripts/runtime/freestocklineskill_runtime/sources.py (reported line 575)May include surrounding context.

python
"Cache-Control": "no-cache",
            "hexin-v": js_code.call("v"),
            "Host": "data.10jqka.com.cn",
            "Referer": "http://data.10jqka.com.cn/funds/hyzjl/",
            "User-Agent": USER_AGENT,
            "X-Requested-With": "XMLHttpRequest",
        }

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The helper temporarily mutates process-wide proxy-related environment variables before making library calls. In a shared agent/runtime process, this can affect unrelated concurrent tasks, bypass enterprise egress controls, and cause security tooling or audit paths to be skipped for outbound requests.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill executes embedded JavaScript via py_mini_racer to synthesize request headers, which introduces a non-obvious code-execution surface into an otherwise data-retrieval component. If the bundled JS file or dependency path is tampered with, the runtime behavior changes in ways that are harder to audit and may facilitate evasion or malicious request generation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All headings, instructions, and trigger phrases are presented only in Chinese, which can amount to forcing a specific language without documenting user choice. The file does not state that the skill is region-specific or that Chinese is an optional locale selected by the user.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The session sets Accept-Language to zh-CN,zh;q=0.9,en;q=0.8, which imposes a Chinese locale preference on all requests made through this client. The policy allows locale constraints only when user choice or clear justification is provided, and this code does not expose such an opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This request header again sets Accept-Language to zh-CN,zh;q=0.9,en;q=0.8 for a specific upstream service. Repeating the fixed locale preference reinforces that the skill is designed to force a locale rather than letting the user choose or clearly documenting the regional constraint.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/runtime/freestocklineskill_runtime/sources.py (reported line 936)May include surrounding context.

python
def _akshare_call(self, name: str, *args: Any, **kwargs: Any) -> List[Dict[str, Any]]:
        import akshare as ak

        func = getattr(ak, name)
        return _df_to_records(_quiet_call(func, *args, **kwargs))

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/runtime/freestocklineskill_runtime/sources.py (reported line 1261)May include surrounding context.

python
def _optional_ak_call(module: Any, name: str, **kwargs: Any) -> List[Dict[str, Any]]:
    func = getattr(module, name, None)
    if func is None:
        return []
    try: