Back to skill

Security audit

Financial Edu David

Security checks for vulnerabilities and agentic risk

Overview

This skill performs disclosed public A-share financial report collection and dashboard generation, with some dashboard hardening issues but no hidden or destructive behavior found.

Install only in a virtual environment and use a dedicated output folder. Treat generated dashboards as local analysis artifacts unless the HTML is hardened with escaping, safer JSON embedding, and trusted or bundled chart libraries. Do not use this as investment advice without independently verifying the financial data.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_dashboard.py:91
Finding

HTML and JavaScript Injection in Generated Financial Dashboards

Content
View full analysis
{stock_name}({stock_code})动态财务分析看板 {ECHARTS_CDN} {CSS_FRAMEWORK}

{stock_name}({stock_code})动态财务分析数据可视化看板

资产负债趋势

营收与净利润趋势

""" ``` ### Technical Analysis The function inserts `stock_name` and `stock_code` directly into HTML text contexts without HTML escaping. A value containing markup can therefore terminate the existing element and inject arbitrary HTML or JavaScript. The serialized `core_data` and `metrics` objects are also inserted directly into a `` can terminate the script element because HTML parsing occurs before JavaScript parsing. For example, an input containing the following value could escape from the intended context: ```html ``` This is a stored client-side injection issue because the payload is written into the generated dashboard and execut ...[truncated 1363 chars]
Remediation
View remediation
` block. At minimum, neutralize characters significant to the HTML parser: ```python def safe_json_for_html(value): return ( json.dumps(value, ensure_ascii=False) .replace("&", "\\u0026") .replace("<", "\\u003c") .replace(">", "\\u003e") .replace("\u2028", "\\u2028") .replace("\u2029", "\\u2029") ) ``` 3. Prefer placing serialized data in a non-executable element: ```html ``` Then read and parse its `textContent`. The JSON must still encode `<` to prevent `` termination. 4. Validate stock codes against their expected format, such as exactly six decimal digits, and constrain company names to a reasonable length. 5. Add regression tests using payloads such as: ```text ``` 6. Deploy generated dashboards with a restrictive Content Security Policy that disallows inline and unauthorized remote scripts. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/generate_dashboard.py:40
Finding

Remote JavaScript Execution Through Unverified CDN Dependencies

Content
View full analysis
(function(){ var urls = [ "https://cdn.bootcdn.net/ajax/libs/echarts/5.4.3/echarts.min.js", "https://cdn.staticfile.org/echarts/5.4.3/echarts.min.js", "https://lib.baomitu.com/echarts/5.4.3/echarts.min.js", "https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js", "https://unpkg.com/echarts@5.4.3/dist/echarts.min.js" ]; var s=document.createElement("script"); s.src=urls[0]; s.onerror=function(){ s.src=urls[1]; }; document.head.appendChild(s); })(); """ ``` ### Technical Analysis Every generated dashboard retrieves executable JavaScript from an external CDN when opened. The script is dynamically created without Subresource Integrity, a cryptographic digest, signature verification, or a trusted local copy. Consequently, the code that runs in the dashboard can change after the Skill has been reviewed. Compromise of a CDN account, hosted artifact, dependency publication channel, DNS path, or delivery infrastructure could cause arbitrary JavaScript to execute in every dashboard that loads the affected source. Although five URLs are declared, the implementation only attempts the first source and then the second source on error. This does not address integrity and does not implement the documented five-source fallback. ### Attack Path 1. An attacker compromises one of the configured CDN delivery paths or causes it to return a modified ECharts file. 2. A user opens a generated financial dashboard while connected to the affected source. 3. The dashboard creates a `
Remediation
View remediation
` element with: - An exact dependency version. - A verified Subresource Integrity hash. - `crossorigin="anonymous"`. - An explicit Content Security Policy allowlist. Example: ```html ``` 4. Do not implement failover across unrelated CDNs unless every artifact has independently verified integrity metadata. 5. Apply a restrictive Content Security Policy, preferably with no remote script sources when the library is bundled locally. 6. Document the provenance, version, hash, and update procedure for the ECharts artifact. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:24
Finding

Unpinned Python Dependencies Create a Non-Reproducible Installation Supply Chain

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a comprehensive end-to-end financial analysis toolkit, but this code chunk implements only a narrow subset: generating a basic HTML visualization template from already-supplied data. It does not download annual reports, parse PDFs, extract financial statements, calculate financial metrics, or perform F10 cross-checking. The script itself explicitly states it is a template/reference file and that actual logic must be added separately. While dashboard generation is indeed part of the declared purpose, the actual code is materially more limited than the declared full workflow, so this chunk does not accurately represent the broader described capability.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill explicitly instructs network access, reading PDFs, and writing multiple output files, but it does not declare any tool scope or permissions boundary. That creates an authorization gap where an agent may execute broader file and network operations than users or the platform can easily audit, increasing the chance of overreach or misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad and open-ended, covering generic requests like analyzing a company’s finances or downloading annual reports. Ambiguous invocation scope can cause the skill to activate in contexts the user did not clearly intend, leading to unsolicited network access, file writes, or execution of a multi-step workflow on loosely matched prompts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's natural-language description and generated HTML are explicitly Chinese-focused, and the document language is fixed to zh-CN. There is no indication that the user can opt into another language or that the locale restriction is required by a region-specific business constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This markdown file is entirely written in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-language or region-specific audience. Under the policy rule for natural-language violations, a fixed language presentation without opt-in can be considered a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language strings that require Chinese comprehension for usage, configuration, and runtime interpretation. Under the policy rule for language or locale constraints, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code writes a generated dashboard to an arbitrary output path, which can overwrite an existing file, but there is no prior warning, confirmation, or cautionary note in the function docstring about modifying the filesystem. The only visible disclosure is a post-write success message, which does not warn the user before the write occurs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.