Back to skill

Security audit

Stock Investment System

Security checks for vulnerabilities and agentic risk

Overview

This is a Chinese stock-analysis framework with notable financial-advice risks, but I found no code execution, persistence, credential access, exfiltration, or hidden malicious behavior.

Install only if you want a Chinese-language stock-analysis checklist. Do not let it place trades or rely on it as licensed financial advice; verify all market data independently, treat 奇门遁甲 timing as non-evidence-based, and review any Wind/MCP integration before granting tool access.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Note
Location
references/wuwei-bayesian-v3.4.md:95
Finding
Invisible zero-width Unicode characters reduce instruction auditability<![CDATA[ ## Vulnerability Details **File Location**: `references/wuwei-bayesian-v3.4.md`, lines 95, 219, 231, and 237 **Vulnerability Type**: Invisible Unicode format characters in Skill documentation **Risk Level**: Low ### Vulnerable Code Snippets The invisible U+200B characters are rendered as `\u200B` below so they can be inspected: ```markdown Line 95: | **\u200B** | [table column] | [table column] | Line 219: | **\u200B** | **P≥80%** | **P 60-80%** | **P<60%** | Line 231: | **\u200B** | [optimistic] | [baseline] | [pessimistic] | Line 237: | → **Expected value** | \u200B | \u200B | \u200B | ``` The original file contains literal U+200B ZERO WIDTH SPACE characters rather than the visible escape sequences shown above. The surrounding non-English labels have been translated only for report-language compliance. ### Technical Analysis U+200B is an invisible Unicode format character. In this file, it occurs in Markdown table cells and appears to have been used as a formatting placeholder. No executable code, hidden command, remote resource, or malicious instruction was identified alongside these characters. Nevertheless, invisible format characters make source review less reliable because visually identical text can have different byte-level representations. They may interfere with exact matching, validation, content hashing, Markdown processing, or security rules that inspect visible strings. If such characters are permitted without validation, a later contributor could use similar Unicode formatting characters to conceal instruction changes or bypass simplistic text-based checks. This is classified as `T09: Insecure Skill Coding Practices` because it is a source-hygiene and reviewability weakness in Skill content. The present characters do not constitute an active code-execution payload. ### Attack Path A potential exploitation path would require a future malicious modification: 1. An attacker or compromised contributor gains permission ...[truncated 1176 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove every U+200B character and use ordinary empty Markdown cells where blank content is required. 2. Normalize all documentation as UTF-8 using Unicode NFC normalization. 3. Add a CI check that rejects unexpected Unicode control and format characters, including U+200B and characters in Unicode category `Cf`. 4. If a format character is genuinely required, document and allowlist its exact location and purpose. 5. Configure editors to display invisible characters during review. 6. Review changes at both rendered and raw-byte levels for files containing Agent instructions. 7. Re-run the check across the repository after remediation to verify that no hidden format characters remain. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/six-layer-matrix-v1.0.md:125
Finding
Standalone invisible Unicode character at end of reference file<![CDATA[ ## Vulnerability Details **File Location**: `references/six-layer-matrix-v1.0.md`, line 125 **Vulnerability Type**: Invisible standalone Unicode format character **Risk Level**: Low ### Vulnerable Code Snippet The complete affected line is shown using an escaped forensic representation because the original character is invisible: ```text \u200B ``` The actual file contains one literal U+200B ZERO WIDTH SPACE character on line 125. ### Technical Analysis A standalone U+200B character has no visible rendering and no documented functional purpose. It is inert Markdown content and does not execute commands or alter system privileges. However, invisible trailing content can cause byte-level differences that are not apparent during ordinary review. It can also interfere with end-of-file checks, content signatures, comparisons, and parsers that do not normalize Unicode consistently. No malicious payload, encoded command, instruction hijacking, or executable behavior was found on this line. The issue is classified as `T09: Insecure Skill Coding Practices` because retaining unexplained invisible content weakens source integrity and reviewability. ### Attack Path The current character does not provide a direct exploitation path. A hypothetical abuse scenario would be: 1. An attacker obtains write access to the repository. 2. The attacker uses invisible format characters to conceal meaningful changes or make files appear unchanged in rendered views. 3. Reviewers approve the change based only on rendered output. 4. A downstream parser, integrity checker, or Agent processes the altered raw content differently. This scenario requires both repository modification capability and additional malicious content; neither is present in the audited line. ### Impact Assessment The current impact is limited to repository hygiene, audit reliability, and possible inconsistencies in parsing or file comparison. It grants no privileges and exposes no data. No code exe ...[truncated 140 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Delete the standalone U+200B character and ensure the file ends with a conventional newline. 2. Add a pre-commit and CI rule that detects unexpected Unicode format characters. 3. Normalize text files before integrity checks and packaging. 4. Configure repository review tooling to highlight invisible characters and trailing non-whitespace content. 5. Document any intentional use of non-printing Unicode and reject all undocumented occurrences. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (14)

Hidden Instructions

High
Category
Prompt Injection
Content
#### 先验来源差异

| **​**  | **股票**             | **股权**            |
| ------ | ------------------ | ----------------- |
| P(好)来源 | 行业β + 市场情绪 + 分析师共识 | 行业 + 团队 + 退出 + 竞争 |
| 信息基础   | 公开信息·相对对称          | 尽调信息·高度不对称        |
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
#### 先验来源差异

| **​**  | **股票**             | **股权**            |
| ------ | ------------------ | ----------------- |
| P(好)来源 | 行业β + 市场情绪 + 分析师共识 | 行业 + 团队 + 退出 + 竞争 |
| 信息基础   | 公开信息·相对对称          | 尽调信息·高度不对称        |
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
#### 先验来源差异

| **​**  | **股票**             | **股权**            |
| ------ | ------------------ | ----------------- |
| P(好)来源 | 行业β + 市场情绪 + 分析师共识 | 行业 + 团队 + 退出 + 竞争 |
| 信息基础   | 公开信息·相对对称          | 尽调信息·高度不对称        |
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
#### 先验来源差异

| **​**  | **股票**             | **股权**            |
| ------ | ------------------ | ----------------- |
| P(好)来源 | 行业β + 市场情绪 + 分析师共识 | 行业 + 团队 + 退出 + 竞争 |
| 信息基础   | 公开信息·相对对称          | 尽调信息·高度不对称        |
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
#### 先验来源差异

| **​**  | **股票**             | **股权**            |
| ------ | ------------------ | ----------------- |
| P(好)来源 | 行业β + 市场情绪 + 分析师共识 | 行业 + 团队 + 退出 + 竞争 |
| 信息基础   | 公开信息·相对对称          | 尽调信息·高度不对称        |
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill provides actionable trading guidance such as opening, adding, reducing, and liquidating positions, including position sizing and execution gates, without an explicit warning that use may result in real financial loss. This increases the chance that users treat the output as authoritative operational advice rather than an educational framework, creating foreseeable harm in a high-stakes domain.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The skill goes beyond an investment-analysis framework and explicitly orchestrates another skill/tool (`wind-mcp-skill`) for data verification. Cross-skill delegation expands the trust boundary and can trigger unintended tool use, capability escalation, or hidden dependencies that are not declared in the manifest, making the skill harder to audit and sandbox safely.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill references a local file path (`~/.hermes/references/skill-output-specs.md`) as formatting guidance, creating an undeclared dependency on host-local state outside the skill package. In an agent setting, this can cause non-deterministic behavior, leakage of environment assumptions, or prompt/toolchain confusion if the file is missing, substituted, or contains attacker-controlled content.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document gives concrete trading decision instructions such as 建仓/加仓/减仓/清仓 and action thresholds like '至少四层🟢才动手' without any warning that the framework is not financial advice and may lead to losses. In the context of an investment skill, users could treat this as authoritative guidance and make real financial decisions without understanding the risk, suitability, or uncertainty involved.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The file explicitly recommends using 奇门遁甲 timing signals for buy/add/reduce/liquidate decisions and even provides operational rules by decision type, presenting a speculative divination method as part of a trading framework. Without a warning that such signals are unverified and unreliable for financial decision-making, users may be misled into taking materially risky actions based on pseudoscientific inputs.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
该规则适用于所有文件类型。文档标题、说明、模板和操作指引均以中文固定呈现,未看到允许用户选择其他语言、或说明该技能仅面向特定中文使用场景的声明,构成潜在的语言/locale policy violation。

Vague Triggers

Medium
Confidence
91% confidence
Finding
The top-level activation cues are broad and include generic concepts like financial reports, volatility, announcements, catalysts, and abnormal information flow. In an agent skill, such loose triggers can cause unintended invocation during ordinary market discussion, leading the system to produce investment-analysis behavior outside the user's actual intent.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The event-driven checklist is triggered by vague conditions such as earnings, ±10% price movement, major announcements, industry catalysts, or abnormal information flow, without specifying scope, source, or disambiguation. This increases the chance that routine news or ambiguous chatter activates decision logic and produces actionable-looking investment recommendations unintentionally.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
SQP-3 applies to all file types for natural-language policy issues. The skill is entirely presented in Chinese and is targeted to A股/港股 investors, but it does not explicitly offer users a language preference or make clear that the locale-specific presentation is an intentional opt-in constraint.

Static analysis

No suspicious patterns detected.