Back to skill

Security audit

Financial Advisor

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent financial-analysis toolkit, but it ships an opaque encrypted backup file and has several under-scoped risks around automatic dependency installation, broad web/news collection, and generated HTML reports.

Install only if you are comfortable with a broad finance workflow that fetches third-party web and market data, writes local research/report files, and may generate actionable-looking investment opinions. Prefer running it in an isolated environment, remove the encrypted backup file, pin dependencies, avoid opening generated reports with network access until HTML escaping/CDN integrity are fixed, and treat all recommendations as informational rather than personalized financial advice.

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

other

Error
Location
SKILL.md.bak.md:10
Finding

Opaque encrypted content prevents complete security review

Content
View full analysis
eyJpdiI6InRwVWV6aVVhNlRRQVpaYmJBdTRvRXc9PSIsImF1dGhUYWciOiJRQTNURTE5RGNHUG5MS28vNE1EaVFRPT0iLCJkYXRhIjoiSU1kYTBHa0lPdjF4NWFpYVdYMjlBTHpJNHJ2L0VWVzV5QTVmV3luWldCZ1lIZ3BkV0h0bkFaUCtkUEVVTzgzbHNYYXdaL0k0ZXpYK2ZsNm82... ``` The payload continues as an approximately 108 KB Base64-encoded encryption envelope containing `iv`, `authTag`, and `data` fields. ### Technical Analysis The backup Skill file contains a large encrypted and authenticated payload whose plaintext is unavailable for static inspection. This is not evidence that the payload is malicious, and no decoder, decryption key, or direct execution path was found in the reviewed scripts. However, the artifact prevents reviewers from determining whether it contains hidden instructions, code, secrets, or unsafe content. The file is outside the minimum set required for the documented financial-analysis functionality. Shipping an opaque backup artifact also creates ambiguity about whether a Skill loader or external deployment process might process files other than the primary `SKILL.md`. ### Attack Path A potential exploitation path would require behavior outside the directly reviewed scripts: 1. The package is installed with `SKILL.md.bak.md`. 2. A Skill loader, deployment process, or external component discovers backup Markdown files. 3. That component obtains a decryption key and decrypts the opaque payload. 4. Unreviewed instructions or content are introduced into an Agent session. No such loader or decryption process was found in this project, so this attack path remains conditional rather than demonstrated. ### Impact Assessment If an external system decrypts and consumes the payload, its effective privileges would depend on that system. It could ...[truncated 213 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_html_report.py:443
Finding

Stored HTML and JavaScript injection in generated financial reports

Content
View full analysis
' if summary: brief_html += f'

💡 {summary}

' if recommendation: brief_html += f'
' brief_html += f'{rec_icon} {recommendation}' ``` ```python for row in event_rows: direction = row['direction'] dir_cls = 'up' if '利好' in direction or '正' in direction else 'down' if '利空' in direction or '负' in direction else 'flat' strength = row['strength'] str_color = '#dc2626' if '强' in strength else '#d97706' if '中' in strength else '#6b7280' events_html += f'{row["event"]}' events_html += f'{direction}' if direction else '—' events_html += f'{strength}' if strength else '—' events_html += f'{row["summary"]}' ``` The resulting fragments are inserted into templates: ` ...[truncated 2258 chars]
Remediation
View remediation
`, event-handler attributes, malformed tags, quotes, and `javascript:` URLs. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/setup_dependencies.py:11
Finding

Automatic installation of unpinned third-party dependencies

Content
View full analysis
={version}'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL ) return True except subprocess.CalledProcessError: return False ``` ```python for package, version in missing_packages: print(f" Installing {package}>={version}...", end=' ') if install_package(package, version): print("✅") else: print("❌") failed.append(package) ``` The same minimum-version policy appears in `requirements.txt`: ```text yfinance>=0.2.36 pandas>=2.0.0 numpy>=1.24.0 matplotlib>=3.7.0 plotly>=5.18.0 scipy>=1.11.0 statsmodels>=0.14.0 requests>=2.31.0 openpyxl>=3.1.0 Jinja2>=3.1.0 ``` ### Technical Analysis The setup script automatically invokes `pip install` for missing packages. The `>=` constraints allow any future release satisfying the lower bound, and no lockfile, package hashes, signed repository policy, or reviewed upper bounds are present. Python packages can execute code during installation and later during import. Consequently, the behavior delegates local code execution to whatever package index and version-resolution configuration is active in the environment. The package names shown are establishe ...[truncated 1177 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/data_fetcher_manager.py:309
Finding

Financial market data is retrieved over plaintext HTTP

Content
View full analysis
Optional[pd.DataFrame]: if requests is None: return None code, is_hk = self._to_tencent_code(symbol) if code is None: return None base_url = ("http://web.ifzq.gtimg.cn/appstock/app/hkfqkline/get" if is_hk else "http://web.ifzq.gtimg.cn/appstock/app/fqkline/get") url = f"{base_url}?param={code},day,,,5,qfq" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'Referer': 'http://stock.finance.qq.com/' } resp = requests.get(url, headers=headers, timeout=15) data = resp.json() ``` ```python def _fetch_history_tencent(self, symbol: str, period: str) -> Optional[pd.DataFrame]: if requests is None: return None code, is_hk = self._to_tencent_code(symbol) if code is None: return None period_days = {'1mo': 22, '3mo': 66, '6mo': 126, '1y': 252, '2y': 504, '3y': 756, '5y': 1260, '10y': 2520, 'max': 3000} count = period_days.get(period, 756) base_url = ("http://web.ifzq.gtimg.cn/appstock/app/hkfqkline/get" if is_hk else "http://web.ifzq.gtimg.cn/appstock/app/fqkline/get") url = f"{base_url}?param={code},day,,,{count},qfq" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'Referer': 'http://stock.finance.qq.com/' } resp = requests.get(url, headers=headers, timeout=15) data = resp.json() ``` ### Technical Analysis The Tencent market-data requests use `http://`, which provides neither transport ...[truncated 1560 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/generate_html_report.py:1222
Finding

Generated reports reference executable JavaScript from a third-party CDN without integrity protection

Content
View full analysis
``` ### Technical Analysis The report template references ECharts from a third-party CDN. When a generated report containing this reference is opened while online, the browser retrieves and executes remote JavaScript. Although the URL specifies ECharts version `5.4.3`, no Subresource Integrity hash is provided, and the reviewed report does not establish a restrictive Content Security Policy. Therefore, report behavior depends on the integrity and availability of the CDN, its account and publishing infrastructure, DNS resolution, and the browser's TLS trust path. This is a supply-chain exposure rather than evidence that the current ECharts release or CDN content is malicious. ### Attack Path 1. A report containing the external script reference is generated. 2. The user opens the report in a browser with network connectivity. 3. The browser requests the JavaScript asset from jsDelivr. 4. A compromised CDN artifact, publishing account, or network trust path supplies modified JavaScript. 5. The browser executes that JavaScript in the report's page context. 6. The script reads or changes report content and can make outbound browser requests. ### Impact Assessment A compromised remote script could: - Read financial analysis and news content displayed in the report. - Modify recommendations, values, or charts. - Present phishing content. - Send report data to external servers. - Execute any action available to JavaScript in the report's browser context. This does not directly provide operating-system code execution. Its scope is the browser page and any resources accessible to that origin. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (84)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a comprehensive investment analysis and advisory system with valuation, macro/news intelligence, risk assessment, recommendations, and reporting. The supplied code instead performs a much narrower task: calculating standard technical indicators from already-provided historical price/volume data files. It does not fetch market data, analyze fundamentals, build valuation models, assess macro or geopolitical factors, generate recommendations, or produce HTML reports. While technical indicators can be a component of financial analysis, this script's actual behavior is materially narrower and different from the declared primary purpose, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code is clearly finance-related, but its scope is much narrower than the declared description. It only performs quantitative risk/return metric calculation on supplied historical price files and optional market benchmark data. There is no evidence of institutional-grade valuation workflows, investment recommendation logic, financial statement analysis, macro/geopolitical/news ingestion, competitive analysis, real-time data access, or HTML report generation in this chunk. While 'risk assessment' is consistent with the description, the declared purpose substantially overstates the implemented capabilities and primary breadth of functionality, so this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code substantially supports part of the declared description: DCF valuation, comparable company analysis, and three-statement financial analysis for equities, using local data plus yfinance. However, the declared purpose is much broader and positions the skill as an institutional-grade investment advisory system with recommendations, macro/geopolitical/news intelligence, ETF/fund analysis, market reviews, risk assessment, and HTML reporting with real-time data. None of those broader capabilities appear in this code chunk. The primary implemented purpose is narrower: stock valuation/financial analysis CLI outputting JSON. This is a description-behavior mismatch due to significant overstatement of capabilities and output format.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents a full-featured institutional investment analysis and advisory skill, but this code chunk only provides a market-data access layer. Its actual responsibilities are infrastructure-oriented: symbol normalization, market detection, source routing, realtime/history retrieval, caching, throttling, retries, and circuit-breaker failover across Tencent, AkShare, and YFinance. These behaviors support financial analysis, but they do not themselves perform valuation, recommendations, macro/news analysis, competitive landscape analysis, report generation, or broad advisory workflows. There is no evidence of portfolio advice, DCF/comps modeling, financial statement analysis, ETF/fund-specific analytics, or HTML output in this chunk. Therefore the supplied code materially underimplements the declared purpose and represents a narrower primary capability than advertised.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description substantially overstates the skill’s functionality. The supplied code does perform financial data retrieval relevant to equities and some basic fundamentals/valuation fields, so it partially supports the broad topic area. However, its actual behavior is limited to collecting and exporting market and company data. There is no code for institutional-grade analysis, valuation modeling like DCF or comps, portfolio comparison, recommendations, macro/geopolitical/news analysis, risk modeling, or HTML report generation. Thus the description does not accurately represent what this code chunk actually does; it is primarily a data-fetching utility rather than a full investment analysis and advisory skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a broad institutional-grade financial analysis and investment advisory capability, including valuation, modeling, recommendations, macro/geopolitical intelligence synthesis, and HTML report generation. The supplied code does not implement those functions. Instead, it is a trending-topic collection utility that fetches hot lists from Baidu, Weibo, Zhihu, Toutiao, Xueqiu, 36Kr, The Paper, IT之家, Hupu, 少数派, Bilibili, Douyin, and Douban using HTTP requests and fallback scraping logic, then saves the results as JSON. While some sources can contain finance-relevant news and one source is finance-oriented (Xueqiu), the code only gathers topical trend data; it does not analyze securities, perform valuations, model financial statements, assess portfolio risk, generate recommendations, or create HTML reports. Therefore the actual primary purpose is materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description promises a comprehensive investment analysis skill with valuation modeling, macro/news/geopolitical intelligence, data collection, and HTML reporting. This code chunk only generates a Markdown dashboard from already-produced local data files. Its actual analysis is limited to moving-average alignment, price bias, basic risk metric extraction, and templated buy/hold/sell messaging. Several advertised capabilities are absent entirely: no DCF, comps, financial modeling, market-wide review, macro analysis, geopolitical analysis, or real-time/news intelligence gathering. Some sections are explicitly placeholders (volume ratio, chip concentration, search/news results). Therefore the description materially overstates and misrepresents what this code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The description presents a comprehensive investment analysis and advisory skill with valuation, company/fund analysis, recommendations, and HTML reporting. The supplied code does not implement those primary capabilities. Instead, it implements a narrower supporting component: macroeconomic data retrieval, business-cycle assessment, search-query generation, trending-news classification, temporal filtering, deduplication, keyword extraction, and JSON export. Some declared elements are partially aligned—macro-economic context, geopolitical/news intelligence, and data collection are indeed present. However, the code chunk’s actual purpose is materially narrower than the declared end-to-end institutional investment analysis capability, and specific headline features like DCF/comps/financial modeling/recommendations/HTML reports are missing. Therefore this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description substantially overstates the skill. The supplied code only gathers market data from Tencent Finance, yfinance, and optionally akshare to produce a simple market recap for CN/HK/US indices, A-share breadth statistics, and sector gainers/losers. Its primary purpose is market review/report generation, not comprehensive financial analysis or investment advisory. While market reviews are mentioned in the declared description, the description promises many additional analytical and advisory capabilities that this code does not implement. Therefore this is a material description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a full investment analysis and advisory skill with institutional-grade valuation and reporting capabilities. The supplied code chunk is much narrower: it is a search-strategy generator focused on 16 dimensions of news/policy/intelligence discovery, with recency filtering and preferred-source guidance. It prepares queries for an external agent/tool such as web_search, but does not execute searches in this code, ingest results, compute valuations, model financials, compare investments, or issue recommendations. Parts of the declared scope such as macro/geopolitical/news intelligence are directionally aligned, but the primary implemented behavior in this chunk is query orchestration rather than actual financial analysis or advisory output. Therefore the description materially overstates the code's implemented capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code does not implement any financial analysis, investment recommendation, data collection, valuation, or intelligence-gathering behavior described in the skill declaration. Instead, it is purely a frontend navigation helper for HTML reports, tracking scroll position and toggling an 'active' CSS class on navigation items. While HTML report generation is mentioned in the description, this code does not generate reports; it only provides a UI enhancement unrelated to the declared primary purpose. Therefore, the description materially misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full-featured financial analysis and investment advisory capability with data gathering, valuation, macro/news intelligence, and report generation. The supplied code does none of that. It only inspects filesystem contents in provided data/output directories, verifies presence of files matching expected names/types, checks for HTML reports and chart files, and writes a validation summary text file. This is a materially different primary purpose: execution artifact validation rather than financial analysis. There are no undeclared dangerous permissions here, but the behavior is clearly inconsistent with the declared skill purpose.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: financial-advisor
description: Professional financial analysis and investment advisory skill with institutional-grade valuation capabilities. Use when users want to analyze stocks, funds, ETFs, compare investments, get market reviews, perform DCF valuation, comparable company analysis, financial statement modeling, competitive landscape analysis, macro-economic analysis, geopolitical impact assessment, or receive investment recommendations. Provides data collection, quantitative analysis, risk assessment, valuation modeling, macro-economic context, global event intelligence, news intelligence, and HTML report g

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document title and all operational guidance are written in Chinese, which imposes a specific language on users. Under the policy, locale or language constraints should either be optional via user choice or clearly justified as region-specific; neither appears here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide explicitly directs the skill to collect broad political and global hot-topic data beyond core financial analysis. In a financial-advisor skill, this expands data collection scope into unrelated current-affairs surveillance, creating purpose drift and increasing the chance the agent gathers unnecessary sensitive or manipulative context not justified by the manifest.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented macro workflow integrates unrestricted current-affairs classification across 13 categories and states it is not limited to finance. That broadens the skill from financial analysis into general monitoring and profiling of political and social topics, which is misaligned with least-privilege data use and can facilitate over-collection under the cover of advisory functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide says all hot topics will be classified, including a catch-all general category, rather than filtering to finance-related content. This defeats scope limitation and allows the skill to ingest arbitrary trending content that may be irrelevant, privacy-invasive, or usable for non-financial influence analysis while appearing to operate as an investment tool.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents shell commands, file reads/writes, and network-capable data collection workflows but does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, this increases the chance the skill is run with broader-than-necessary capabilities, enabling unintended filesystem or network access if the skill or its referenced scripts are modified or abused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill advertises broad data collection, web search, trending/news aggregation, and HTML report generation but does not clearly disclose what user or derived data may be stored, where it is written, or how external services are contacted. In this context, undisclosed collection and persistence can expose sensitive research interests, portfolio symbols, or generated reports to privacy and compliance issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the agent to produce investment recommendations, target prices, stop losses, and trading actions without a clear user-facing disclaimer that the output is not financial advice and may be wrong or harmful. In a financial-advisory context, this materially increases the risk of user harm, complaints, and unsafe reliance on automated outputs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest uses very broad trigger language such as 'analyze stocks, funds, ETFs' and 'receive investment recommendations,' which can cause the skill to activate for a wide range of common finance queries without clear scoping. Over-broad activation increases the chance the agent invokes high-impact financial-advice behavior in contexts where the user did not explicitly request regulated or sensitive advisory assistance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill advertises 'investment recommendations' with no visible qualification, suitability checks, jurisdictional constraints, or explicit opt-in safeguards in the exposed manifest. In a financial-advice context, this can lead to unsolicited or insufficiently qualified recommendations, creating elevated user harm and compliance risk if the agent over-relies on the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example explicitly instructs broad collection of web-wide trending data and multiple external searches, but it does not clearly disclose that user requests, stock targets, and derived search terms may be sent to third-party services or public endpoints. In a financial-advisory context, this can leak sensitive research intent, portfolio interest, or user context externally without informed consent, especially because the workflow mandates these networked steps before analysis.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document presents concrete investment recommendations, price targets, stop-loss levels, and allocation guidance without a clear user-facing disclaimer that the content is informational only and not personalized financial advice. In a financial-advisor skill, this increases the likelihood that users will treat generated output as authoritative advice and make consequential financial decisions without understanding limitations, suitability, or risk.

Content

No source excerpt is available for this finding.