Back to skill

Security audit

A股涨停板龙虎榜深度研判+财富密码策略

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real finance-report generator, but unsafe report rendering and stale hardcoded output make it a Review case before installation.

Install only if you trust the publisher and run it in an isolated project or virtual environment. Do not feed untrusted JSON or upstream market snapshots into the renderer until HTML escaping, a restrictive browser configuration, and dependency pinning are added. Treat generated PPTX files as sample/stale unless you verify the date and data manually.

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
scripts/generate_daily.py:75
Finding
Unescaped report data executes in a local-file-enabled Chromium context<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/generate_daily.py:75-129` - `scripts/generate_daily.py:154-198` - `scripts/generate_daily.py:225-228` **Vulnerability Type**: Stored HTML and JavaScript injection during automated PDF rendering **Risk Level**: High ### Vulnerable Code The report body directly interpolates dynamic values into HTML: ```python body = f"""<!DOCTYPE html> <html lang="zh-CN"><head> <meta charset="UTF-8"> <title>涨停板龙虎榜深度研判报告-{date}</title> <style> body{{font-family:"PingFang SC","Microsoft YaHei",sans-serif;max-width:980px;margin:24px auto;color:#12181F;line-height:1.65}} h1{{color:#002B5C;border-bottom:3px solid #C5A572;padding-bottom:8px}} h2{{color:#002B5C;margin-top:32px;border-left:4px solid #C5A572;padding-left:10px}} pre{{background:#F6F8FA;padding:12px;border-left:3px solid #C5A572;overflow:auto}} table{{border-collapse:collapse;width:100%;margin:12px 0;font-size:13px}} th,td{{border:1px solid #DDE3EA;padding:6px 10px;text-align:left}} th{{background:#0A3D6E;color:#fff;font-weight:600}} tr:nth-child(even){{background:#F6F8FA}} .ok{{color:#1E8449;font-weight:600}} .no{{color:#C1272D;font-weight:600}} .callout{{background:#FDF3F3;border-left:4px solid #C1272D;padding:10px 14px;margin:12px 0}} .muted{{color:#6B7785;font-size:12px}} </style> </head><body> <h1>涨停板龙虎榜深度研判报告 · {date}</h1> <p class="muted">口径版本 <b>{C.CALIBER_VERSION}</b> · 框架:L1→L2→L2.5→L3 四层漏斗 + 财富密码选股策略</p> <h2>0. 本报告口径(v2 永久生效)</h2> {caliber_html} <h2>1. 四层漏斗执行结果</h2> {funnel_html} <h2>2. 评分管道 · 风控信号表</h2> {rows_html} <h2>3. α 账本</h2> <p class="muted">阶段 <b>{result['ledger']['stage']}</b> · α_max <b>{result['ledger']['alpha_budget']:.1%}</b> · 已用 <b>{result['ledger']['used_pct']:.2%}</b> · 剩余 <b>{result['ledger']['remaining']:,.0f}</b> 元 · 持仓 <b>{result['ledger']['positions']}</b> 笔</p> <h2>4. 盘前 6 项检查</h2> {PB.render_checklist_md().replace("<table>", '<table><thead>').replace("</table>", "</thead></table>").replace("<tr>", "<tr><th>#</th><th>检 ...[truncated 4235 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Escape every untrusted value according to its output context.** - Apply `html.escape(str(value), quote=True)` to stock names, codes, notes, actions, industry names, rejection reasons, dates, and all other dynamic text. - Do not escape complete, trusted HTML fragments and untrusted values using the same helper. 2. **Use an auto-escaping template engine.** - Replace manual f-string HTML construction with Jinja2 or an equivalent engine configured with auto-escaping. - Require explicit marking for the small number of trusted HTML fragments. 3. **Validate structured input.** - Restrict the date to a strict `YYYY-MM-DD` format. - Validate stock codes, actions, stages, and numeric values against allowlists or schemas. - Reject unexpected object types and unknown fields with a JSON Schema or typed validation model. 4. **Remove unnecessary Chromium privileges.** - Remove `--allow-file-access-from-files` from both `scripts/generate_daily.py` and `templates/make_pdf.py`. - If local assets are required, use a narrowly scoped local HTTP server or embed trusted assets directly. 5. **Disable network access during rendering.** - Use Playwright route interception to abort `http://`, `https://`, WebSocket, and other unnecessary requests. - Permit only the exact local resources needed for report generation. 6. **Apply a restrictive Content Security Policy.** - Disallow inline scripts and event handlers. - Use a nonce or hash for any required trusted script. - Set `default-src 'none'`, then explicitly permit only necessary resources. 7. **Add security regression tests.** - Test names and notes containing script elements, event handlers, malformed tags, quotes, and URL-bearing elements. - Confirm that payloads appear as visible text and do not execute during PDF generation. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:236
Finding
Third-party Python packages and Chromium artifacts are installed without version or integrity pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:236-237` **Vulnerability Type**: Unpinned dependency and browser artifact installation **Risk Level**: Medium ### Vulnerable Code ```text - Python 3.10+: `python-pptx`, `lxml`, `Pillow`, `playwright` - PDF: Playwright bundled chromium (`pip install playwright && playwright install chromium`) ``` ### Technical Analysis The Skill documents runtime dependencies only by package name and recommends installing Playwright and Chromium without fixed versions, hashes, a lock file, or a trusted package-index configuration. As a result, the effective code installed by a user depends on the latest artifacts served by package and browser distribution infrastructure at installation time. This makes builds non-reproducible and prevents reviewers from verifying that the installed dependencies are the same components that were tested with the Skill. No evidence was found that the named packages are intentionally malicious. The weakness is the absence of version and integrity controls, not confirmed dependency confusion or typosquatting. ### Attack Path 1. A user follows the documented installation procedure. 2. `pip` resolves the current releases of Playwright and its transitive dependencies from the configured package index. 3. `playwright install chromium` downloads a browser artifact selected by the installed Playwright version. 4. If a package publisher account, package index, mirror, DNS path, browser distribution channel, or newly released dependency is compromised, attacker-controlled code can be installed. 5. The malicious package may execute during installation, import, or report generation with the privileges of the user running the Skill. ### Impact Assessment A compromised Python dependency or browser artifact could obtain native code execution under the account installing or running the Skill. Potential scope includes: - Reading and modifying files available to that user. - Accessing report ...[truncated 439 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a dependency lock file containing exact versions for all direct and transitive Python dependencies. 2. Generate and enforce cryptographic hashes, for example with `pip-compile --generate-hashes` followed by `pip install --require-hashes`. 3. Pin the Playwright package and the corresponding supported Chromium revision. 4. Use an organization-approved package index or mirror and explicitly configure the expected index URL. 5. Verify downloaded browser artifacts against publisher-provided checksums or signatures. 6. Document a controlled dependency-update process that includes vulnerability scanning, tests, and manual review. 7. Avoid recommending privileged package installation; use a virtual environment or isolated container. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (61)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding says the actual implementation only generates PPTX and omits the promised framework, tracking-pool, and trading-day logic. In context, this is especially risky because the skill markets itself as finance research infrastructure; inaccurate scope and stale/hardcoded outputs can easily be mistaken for validated daily analysis.

Ae1

High
Category
analysis-evasion
Content
| HTML | 数据驱动版模板;可选 ECharts(`assets/echarts.min.js`)注入;MS 色 #002B5C / #C5A572 / #60A3D9;涨红跌绿;`@media print` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The manifest says this skill generates a daily A-share dragon-tiger report three-piece set, implying all outputs correspond to the requested trading day and input data. However, the PPTX path is generated by invoking templates/make_pptx.py while the docstring and log message explicitly admit it still uses hardcoded 2026-09-11 sample data, so one of the claimed outputs does not reflect the actual analyzed data.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
base = f"涨停板龙虎榜深度研判报告-{date}"
    out_html = html_dir / f"{base}.html"
    pptx_path = html_dir / f"{base}.pptx"
    env = os.environ.copy()
    env["POUT"] = str(html_dir)
    env["PFILE"] = f"{base}.pptx"
    # make_pptx 期望从 templates/ 目录运行
Confidence
87% confidence
Finding
Copying the full parent environment into a child process can expose secrets such as API keys, cloud credentials, proxy settings, and tokens to `make_pptx.py` and any libraries it imports. In this skill context, report-generation helpers are part of a larger automation stack and may run in privileged environments, so broad environment inheritance increases the blast radius if that helper script is compromised or behaves unexpectedly.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
R=/path/to/a-share-dragon-tiger-strategy
# OpenClaw(大龙虾)
mkdir -p ~/.openclaw/workspace/skills/a-share-dragon-tiger-report
cp $R/skill/* ~/.openclaw/workspace/skills/a-share-dragon-tiger-report/

# MiMo Desktop / MiMoCode
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger phrases are broad and overlap with common financial-analysis requests, which can cause the skill to activate outside the author's intended scope. In an agent environment, overbroad activation can hijack unrelated user workflows, cause unintended report generation, or route sensitive prompts into a specialized skill without clear user intent.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises shell commands, local file copying, and script execution, but does not declare an explicit tool/permission scope. In agent environments, that can cause the skill to be invoked with broader filesystem and shell authority than users expect, increasing the chance of unintended file writes, local execution, or privilege misuse.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The trigger description is broad and overlaps with generic finance-related requests, which can cause accidental or opportunistic invocation outside its intended scope. Overbroad activation is risky for a skill that can read/write files and run scripts, because it may execute on prompts where users did not intend to authorize those side effects.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The trigger list uses short, underspecified phrases that do not clearly bound scope, prerequisites, or side effects. In an agent setting, ambiguous triggers increase the chance the skill will be selected for loosely related market-analysis requests and perform more privileged actions than the user expects.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
assets/echarts.min.js:45