Back to skill

Security audit

GLM-V-Stock-Analyst

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent stock-analysis/reporting tool, but it deserves review because it installs unpinned packages, sends stock targets to many external services, uses some plaintext market-data endpoints, and auto-generates local HTML with file paths.

Install only in an isolated environment, review or pin dependencies before running setup.sh, avoid using sensitive portfolio/watchlist symbols if provider privacy matters, and verify important financial conclusions against trusted HTTPS sources. Treat the generated reports as informational because some data may come from unauthenticated HTTP endpoints and local HTML rendering can expose file paths.

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

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:4
Finding

Unpinned Third-Party Dependencies Create a Supply-Chain Risk

Content
View full analysis
=1.18.0 yfinance>=1.0.0 tushare>=1.4.0 pandas>=2.0.0 numpy>=1.24.0 matplotlib>=3.7.0 pymupdf>=1.23.0 fpdf2>=2.7.0 python-docx>=1.0.0 Pillow>=10.0.0 markdown>=3.6.0 requests>=2.31.0 ``` ```bash # scripts/setup.sh:75 $PIP install $INDEX_URL -r requirements.txt ``` ### Technical Analysis Every dependency is specified using an open-ended minimum version. Consequently, setup installs whichever newer release the dynamically selected package index serves at execution time. The project does not include a lock file, exact version pins, package hashes, or signature verification. Python packages can execute code during installation and whenever imported. Several of these dependencies are imported automatically by the Skill's scripts. A compromised upstream release, compromised mirror, or malicious transitive dependency could therefore introduce executable code after this Skill has already passed review. The setup script also dynamically selects between PyPI and third-party mirrors. Although the configured mirrors are recognizable services, changing the package source dynamically increases reproducibility and supply-chain trust concerns. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or a selected package index. 2. The attacker publishes or serves a malicious release satisfying the open-ended `>=` constraint. 3. A user follows the documented setup process and runs `scripts/setup.sh`. 4. `pip` resolves and installs the malicious release without checking a reviewed hash. 5. Malicious code executes during installation or when the affected module is imported by a Skill script. ### Impact Assessment Successfu ...[truncated 487 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_all.py:309
Finding

Decision-Critical Market Data Is Retrieved over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/fetch_ir.py:35
Finding

HTTPS-Only URL Validation Does Not Prevent Server-Side Request Forgery

Content
View full analysis
bool: """Download a PDF file over HTTPS only.""" parsed = urlparse(url) if parsed.scheme not in _ALLOWED_SCHEMES: print( f" Unsupported URL scheme: {parsed.scheme} (HTTPS only)", file=sys.stderr, ) return False try: req = urllib.request.Request( url, headers={ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" }, ) resp = urllib.request.urlopen(req, timeout=timeout) ``` ### Technical Analysis The downloader validates only that the initial URL uses the `https` scheme. HTTPS does not imply that a destination is public or trusted. An attacker can provide an HTTPS URL whose hostname resolves to a loopback, private, link-local, reserved, or otherwise internal IP address. `urllib.request.urlopen` also follows redirects by default. The code does not validate the destination of each redirect hop. Therefore, an initially acceptable public HTTPS URL may redirect the request to an internal service or another prohibited destination. The 50 MB response limit reduces denial-of-service exposure but does not prevent SSRF. The code also does not verify a PDF MIME type or `%PDF-` signature before writing and parsing the response. ### Attack Path 1. An attacker supplies `--url` with an attacker-controlled HTTPS hostname or HTTPS redirector. 2. The hostname resolves to an address reachable from the Agent but inaccessible to the attacker, or the public server redirects to such an address. 3. `urllib.request.url ...[truncated 1154 chars]
Remediation
View remediation
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 (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description claims a sophisticated stock analysis and forecasting skill that gathers and synthesizes financial data across markets to produce structured analytical reports. The code shown does none of that. It only reads a local Markdown file, parses common Markdown constructs, and exports the content to PDF or DOCX with formatting and image embedding. This is not merely a supporting implementation detail unless other omitted code performs the actual analysis and this file is only a final export step; based on the supplied chunk alone, the actual behavior is a report-format conversion tool, which is materially different from the declared skill purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个面向证券研究的综合股票分析与预测能力,应当包含多源金融数据整合、分析推理和报告生成。给出的代码并未执行任何股票、行情、新闻、基本面、技术面、资金流或宏观数据分析,也没有做涨跌预测或生成分析报告。其核心功能是获取 IR/PDF 文档并提取可能包含图表的页面图片,属于文档预处理/多模态输入准备工具。虽然这类工具可能作为股票分析流程的辅助组件,但就该代码块本身而言,其实际主功能与声明的 skill 目的存在明显偏离,且包含未声明的文档下载与本地文件处理能力。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill analyzes stocks, predicts trends, integrates multiple financial data sources, and outputs structured multimodal reports. The supplied code does none of that. It is purely a Markdown-to-HTML renderer with embedded CSS for professional-looking reports. Its only notable behaviors are parsing markdown, styling output, extracting an H1 as page title, reading from stdin or a file, and converting relative image references into absolute file:// paths. This is a materially different primary purpose from stock analysis, so it is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个完整的股票分析与预测 skill,核心价值在于获取并整合多维数据、进行分析判断并输出结构化报告。实际提供的代码块只是一个纯本地的文本图表工具库,用于把数值序列或 OHLCV 数据渲染成 Unicode 图形,适合不支持图片的环境展示走势。它没有任何网络访问、数据源接入、分析模型、预测逻辑、报告拼装或触发控制代码,因此与声明的主要用途存在实质性不一致。虽然“可视化图表”可算声明中的一个支撑组件,但当前代码仅覆盖非常小的一部分展示层能力,无法代表所宣称的股票分析与预测 skill。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. 没有则自动创建 venv 并安装 `requirements.txt` 中的全部依赖

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
3. 没有则自动创建 venv 并安装 `requirements.txt` 中的全部依赖

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requests or implies broad capabilities including shell execution, local file read/write, network access, and environment variable use, but it does not declare an explicit tool scope or least-privilege boundary. In practice this increases the blast radius of any prompt injection, logic flaw, or user misunderstanding, because the agent may perform filesystem changes, invoke scripts, and access external resources without a clear allowlist.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to match ordinary investment discussion, which increases the likelihood of unintended activation of a high-capability skill. In this context, accidental invocation matters because the skill can perform web searches, run shell commands, create files, and open local reports, so over-triggering expands unnecessary exposure and side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs automatic creation of local HTML/PDF files and opening them in a browser, but does not require clear prior consent at the moment those side effects occur. In a high-capability agent setting, silently generating files and launching local content can surprise users, leak sensitive local paths in rendered content, or expose them to unsafe rendering of untrusted report material.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document is entirely written in Chinese and line 3 gives mandatory reporting instructions in Chinese, including a required disclaimer phrase. This imposes a specific language/locale on downstream use without offering user choice or explaining a region-specific necessity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description, CLI help, status messages, generated Markdown, and generated HTML are written in Chinese and the HTML declares zh-CN, which effectively fixes the locale for users. Under the stated policy, forcing a specific language without opt-in is a natural-language policy issue unless the locale limitation is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level documentation says the script only performs data collection and chart generation and does not generate report text. However, the file defines _generate_data_html, whose docstring and implementation generate a structured HTML page with headings, tables, chart embeds, news, and explanatory UI text, which is materially beyond 'just data collection and chart generation'.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script sends stock identifiers and related request context to multiple third-party services (Eastmoney, Yahoo Finance, Tushare, etc.) without prominently warning the user in the CLI/help text. In an agent-skill context, silent external transmission can expose user interests, portfolio-related symbols, or analysis targets to external providers and may violate privacy or deployment expectations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This code performs outbound requests to external market-data services using user-supplied stock symbols and generated request metadata. In an agent setting, such transmissions can leak user intent or sensitive watchlist/portfolio interest to third parties, especially because the skill description does not clearly foreground that multiple remote providers are contacted.

Content

Scanner excerpt · scripts/fetch_all.py (reported line 193)May include surrounding context.

python
url,
            headers={
                "User-Agent": "Mozilla/5.0",
                "Referer": "https://data.eastmoney.com/",
            },
        )
        return json.loads(

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The script automatically downloads externally hosted research PDFs, which extends transmission beyond simple API lookup into bulk retrieval of third-party content. In a skill context this can create privacy, compliance, and content-supply-chain concerns, since user-requested symbols trigger contact with outside infrastructure and ingestion of untrusted documents without an explicit opt-in boundary.

Content

Scanner excerpt · scripts/fetch_all.py (reported line 944)May include surrounding context.

python
pdf_url,
                headers={
                    "User-Agent": "Mozilla/5.0",
                    "Referer": "https://data.eastmoney.com/",
                },
            )
            resp = urllib.request.urlopen(req, timeout=20)

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · scripts/fetch_all.py (reported line 1791)May include surrounding context.

python
for future, name in futures.items():
                if future.done():
                    try:
                        raw[name] = future.result(timeout=0)
                    except Exception:
                        raw[name] = None
                else:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest and file header frame this component as a backend fetcher that outputs data and images for a multimodal model to analyze. Yet _generate_data_html constructs a presentable HTML page containing chart sections, tabular fundamentals, capital-flow summaries, research reports, and news, which is a user-facing report artifact rather than mere raw inputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a natural-language policy issue because the file forces a single language for its documentation and runtime output. There is no opt-in, alternative locale, or indication that the skill is intentionally region-specific, so users who do not read Chinese may be unable to use it safely or understand warnings.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The converter rewrites relative Markdown image paths into absolute local file:// URIs in the generated HTML. If the Markdown input is attacker-controlled or influenced by untrusted content, this can cause the rendered report to reference sensitive local files on the machine where the HTML is opened, exposing filesystem structure and potentially file contents or existence through the browser or embedding environment. In this skill context, reports are meant to include images and may be viewed locally by operators or users, which makes this behavior more dangerous because it bridges untrusted report content with local file access semantics.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The output template sets <html lang="zh-CN">, and the script’s user-facing text is also entirely in Chinese. For a general-purpose Markdown-to-HTML converter, this imposes a specific language/locale policy without opt-in or explanation, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script falls back to using the system Python environment when python3 is unavailable by setting PIP="pip", and it proceeds to install dependencies without an explicit warning or confirmation. This can unexpectedly modify the host's global Python packages, potentially breaking other applications, violating least-privilege expectations, or contaminating shared environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level docstring states the tool as a text chart generator entirely in Chinese and does not indicate any user-selectable language or locale option. This can violate language/locale policy when a skill implicitly constrains interaction or output language without opt-in or a documented region-specific reason.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

L81 says '脚本只负责采集数据和画图 — 不生成报告、不写HTML', implying scripts do not produce HTML. However L29-L30 and L341-L352 explicitly document a script, md2html.py, whose purpose is to generate HTML output from Markdown, which directly contradicts that statement.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

L245-L249 says to reply to the user before opening the browser and that opening may be done asynchronously afterward, but L251 states report.md and HTML must be completed before replying, and later L341-L346 labels browser opening as required before the reply. This is an active contradiction in the skill instructions about when side effects should occur.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file presents all guidance in a single language and does not mention that Chinese is optional or that other languages are supported. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.