Back to skill

Security audit

A股和港股股票分析助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent stock-monitoring tool, but it handles personal portfolio data, recurring external report delivery, and investment recommendations without enough safeguards or consent controls.

Review this skill before installing if you track real holdings. Use it only if you are comfortable storing positions and trade history in local plaintext JSON files, making outbound market-data requests, and potentially sending reports containing holdings and P&L to a Feishu group. Configure the recipient deliberately, avoid scheduled delivery until verified, and do not rely on its trading suggestions without independently checking market data.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/stock_monitor.py:424
Finding

Fabricated market data can produce misleading investment recommendations

Content
View full analysis
List[Dict]: """模拟K线数据 (当无法获取真实数据时)""" import random quotes = [] base_price = 50.0 for i in range(days): date = (datetime.now().date()).strftime("%Y-%m-%d") open_p = base_price + random.uniform(-2, 2) close_p = open_p + random.uniform(-1.5, 1.5) high_p = max(open_p, close_p) + random.uniform(0, 1) low_p = min(open_p, close_p) - random.uniform(0, 1) volume = random.randint(1000000, 10000000) quotes.append({ "date": date, "open": round(open_p, 2), "close": round(close_p, 2), "high": round(high_p, 2), "low": round(low_p, 2), "volume": volume }) base_price = close_p return quotes ``` ### Technical Analysis When the Sina K-line response is malformed, unavailable, or cannot be parsed, the implementation substitutes randomly generated price and volume history. The caller does not receive a provenance or simulation flag. The synthetic records are passed into the same technical-analysis pipeline as genuine market records. They can consequently affect moving averages, MACD, KDJ, RSI, Bolling ...[truncated 1468 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/stock_monitor.py:322
Finding

Financial market responses are accepted over unauthenticated HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/stock_monitor.py:1053
Finding

Sensitive portfolio and trade records are stored without enforced access restrictions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/troubleshooting.md:192
Finding

Troubleshooting guidance installs an unnecessary unreviewed package

Content
View full analysis
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The code substantially aligns with parts of the description: it performs real-time quote retrieval, technical indicator analysis, and generates basic trading signals. However, key declared capabilities are not fully represented. The description emphasizes custom stock pool monitoring and signal reminders, but the code only analyzes a predefined set of HK tickers and has no customization interface or notification/alert mechanism. The claimed trend prediction is also overstated relative to the implementation, which merely aggregates indicator-based heuristics into buy/sell/hold labels. Therefore the description overstates and partially misrepresents the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是一个较完整的股票监控分析技能,重点包括股票池监控、实时行情、技术分析、趋势预测和提醒机制。但代码内容聚焦于资金面扩展功能:个股/板块资金流向、龙虎榜数据、北向资金汇总和十大成交股展示,并提供CLI命令行查询。虽然这些功能与股票分析领域相关,但与声明中的核心能力存在明显偏差:声明的多数主要能力没有在代码中体现,而代码的主要用途则是资金流向与榜单查询。因此属于实质性描述与行为不一致。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The prompt directs the agent to send the generated report to a Feishu group chat but does not warn the user that potentially sensitive holdings, P&L, and analysis will be disclosed to an external group destination. This creates a meaningful exfiltration risk because financial data may be shared beyond the local environment to unintended recipients.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises access to local files, network, and Python execution via metadata, but it does not declare an explicit tool/permission scope that constrains what the agent may actually use. In an agent environment, missing least-privilege boundaries increases the risk of unintended file access, writes to user data, or broader network use beyond what the user expects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill accesses personal trading and position files, calls external market APIs, and states that reports are pushed to a Feishu group chat, but it does not prominently warn about privacy exposure or outbound data sharing. This can lead users to unknowingly expose sensitive financial holdings, trade history, or derived investment insights to external services and chat recipients.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command guide documents state-changing operations such as adding/removing positions and recording trades, but it does not clearly warn that these commands persistently modify financial records. In a stock-monitoring skill, users may treat examples as read-only analysis commands and unintentionally alter portfolio or trade history, leading to inaccurate records and downstream bad decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The restore instructions directly overwrite existing configuration files with Copy-Item commands and do not warn about destructive replacement or the need to verify backup provenance. This can cause irreversible loss of current portfolio/trade data and, in this skill context, may also restore stale or tampered financial records that affect analysis and alerts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation describes scheduled external data fetching and automatic outbound delivery of generated reports to Feishu, but it does not clearly warn users that data will leave the local environment on a recurring basis. This creates a transparency and consent problem: portfolio contents, holdings, alerts, and derived analysis could be transmitted to third-party services or group recipients without sufficiently explicit disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt explicitly instructs the agent to read local files containing stock pool and position data without any consent, notice, or minimization guidance. These files can reveal sensitive financial holdings and trading intent, so silent access creates a privacy and data-handling risk even if the skill's business purpose is stock reporting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file begins with a Chinese title and all report templates, labels, and checklist items are written exclusively in Chinese, establishing a fixed output language. Under the policy criteria, forcing a specific language without user opt-in is a natural-language policy violation unless a justified region-specific constraint is documented, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code emits user-facing strings exclusively in Chinese, including stock names, status messages, errors, and recommendations such as 买入/卖出/观望. The file provides no option for users to choose language or locale, which is a natural-language policy concern under the language/locale rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill sends stock symbols and monitoring activity to multiple third-party finance endpoints without disclosing that user queries are transmitted externally. Even if symbols seem low sensitivity, watchlists and repeated lookups can reveal investment interests, positions, or strategies to outside services.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as stock monitoring/analysis, but it also implements persistent portfolio and trade-ledger management under the user's home directory. That capability expansion increases the sensitivity of the data handled and can surprise users who may not expect local storage of financial holdings and transaction history from a monitoring skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script writes trade and position data to persistent files in ~/.openclaw without warning or consent, storing sensitive financial information such as holdings, cost basis, and trade history. If the host is shared, backed up externally, or inspected by other local processes/users, this can expose private financial behavior unexpectedly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documented intent of record_trade_and_sync is to record a trade and intelligently synchronize positions, but the command-line handlers for trade buy and trade sell call add_trade plus manual position updates instead of this sync routine. This creates a direct divergence between documented behavior and the actual operational path used by the script, including inconsistent cost-basis handling versus the FIFO recalculation logic elsewhere.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document specifies a fixed presentation convention of red for gains and green for losses, which is a locale-specific choice. Because no opt-in or alternative display option is offered, this can violate language/locale policy expectations for users outside the intended market convention.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

Natural-language policy issues apply to all file types, including markdown. This file presents all instructions, labels, and examples only in Chinese and does not indicate that the user can choose another language or that the locale restriction is intentional and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation instructs users to store sensitive portfolio, position, and trade-history data in plaintext JSON files under a predictable local path, but provides no guidance on file permissions, encryption, or tamper protection. While this is not an exploit by itself, it increases the risk of local privacy exposure and silent data manipulation by other local processes or users on the same machine.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest describes stock monitoring, real-time quotes, technical analysis, trend prediction, and signal alerts. This file documents an additional outbound messaging capability that sends reports to a social group via a message tool and Feishu channel, which is not explicitly justified by the stated purpose except indirectly as 'signal reminders'. Because the capability involves external delivery rather than analysis itself, it is a mild context expansion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains only Chinese-language instructions and labels, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest mentions real-time quotes, technical analysis, trend prediction, and alerts, but this file states that report generation depends on an '资讯接口' response. That suggests external news/information aggregation capability beyond the manifest's explicit description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a stock monitoring and analysis skill focused on watchlists, quotes, indicators, trend prediction, and alerts. This troubleshooting file documents additional operational features such as position records, trade history, profit/loss calculation, and report-generation workflows, which are broader than the stated monitoring purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The file presents the skill instructions and output templates entirely in Chinese, including required report titles and content formats, but does not offer users a language/locale choice. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

User-facing strings, help text, warnings, and reports are consistently emitted in Chinese, and there is no mechanism for user language selection or documented locale restriction. This can violate language/locale policy where tools must not force a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.