Back to skill

Security audit

chan-stock-analysis

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is not clearly malicious, but it automatically saves and uploads generated financial reports and uses broad agent-routing and persistence instructions that users should review before installing.

Install only if you are comfortable with the skill reading market-data credentials, writing reports/charts locally, using an existing bypy Baidu Netdisk authorization, and uploading generated analysis artifacts automatically. Prefer disabling or removing cloud upload and persistent knowledge updates, rotating the exposed Tushare token, and pinning dependencies before use.

Vulnerability Patterns
  • 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
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:3
Finding

Skill Instructions Attempt to Override Agent Routing and Behavior

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:153
Finding

User-Controlled Conclusions Can Be Written into Persistent Skill Knowledge

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/chan_czsc.py:369
Finding

Hard-Coded Tushare API Token Exposes a Reusable Credential

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:307
Finding

Installation Instructions Use Mutable and Unpinned Dependencies

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (56)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 11)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 18)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 91)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 93)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 98)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · REPORT_SAMPLE.md (reported line 100)May include surrounding context.

md
- **走势结构**:自低点0.663以来,日线走出了一个强劲的上涨趋势。目前价格位于历史高位1.129附近,最新价1.093。
        
    - **背驰分析**:价格在1.129创出新高,但下方MACD指标并未同步创出新高,DIFF值有走平回落迹象,红柱面积显著萎缩。这构成了 **“日线级别上涨动能衰竭信号”**​ ,预示着本段上涨趋势已进入尾声,存在构筑大级别顶部的极大可能。当前属于上涨趋势背驰后的第一次回拉过程,正在寻找一个次级别(30分钟)的卖点。
        
    - **均线与关键位**:价格位于所有长短期均线(MA5/MA13/MA34/MA58等)之上,仍属强势多头排列。但短期均线已开始走平粘合,MA5(1.070)可作为短期强弱分界线。

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation introduces use of an external API with token-based access, local caching, and expanded timeframes, yet it is described more narrowly as a general multi-market analysis skill. Undisclosed authenticated outbound access is dangerous because it can leak usage patterns, consume secrets, and broaden external data-sharing without informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill documentation introduces use of an external API with token-based access, local caching, and expanded timeframes, yet it is described more narrowly as a general multi-market analysis skill. Undisclosed authenticated outbound access is dangerous because it can leak usage patterns, consume secrets, and broaden external data-sharing without informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill documentation introduces use of an external API with token-based access, local caching, and expanded timeframes, yet it is described more narrowly as a general multi-market analysis skill. Undisclosed authenticated outbound access is dangerous because it can leak usage patterns, consume secrets, and broaden external data-sharing without informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill documentation introduces use of an external API with token-based access, local caching, and expanded timeframes, yet it is described more narrowly as a general multi-market analysis skill. Undisclosed authenticated outbound access is dangerous because it can leak usage patterns, consume secrets, and broaden external data-sharing without informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill documentation introduces use of an external API with token-based access, local caching, and expanded timeframes, yet it is described more narrowly as a general multi-market analysis skill. Undisclosed authenticated outbound access is dangerous because it can leak usage patterns, consume secrets, and broaden external data-sharing without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad enough to match ordinary conversation, increasing the chance that the skill activates unintentionally. When a skill has file, network, and shell-adjacent behaviors, accidental activation materially raises the risk of unintended data access or side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction to activate immediately at highest priority on common phrases can cause this skill to preempt safer or more appropriate behaviors. In context, that is dangerous because the skill includes persistence, network access, and installation guidance beyond simple analysis.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill mandates automatic local saves and cloud uploads without a clear user-facing warning or opt-in for persistence and external transfer. Silent storage and transmission of outputs is a classic data-governance and privacy risk, especially for user-specific financial analysis.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Invoking bypy subprocess commands gives the skill arbitrary operational access to Baidu Netdisk workflows that are unrelated to stock analysis. In skill context, this is more dangerous because the advertised purpose is financial analysis, so cloud-storage command execution is unexpected and can conceal data staging, upload, or remote file enumeration behaviors.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill uploads generated reports to Baidu Netdisk, an undeclared external destination, creating a clear data exfiltration path. Because reports may contain user-request context, symbols of interest, and derived analysis artifacts, automatic cloud transmission is especially dangerous in an agent skill that users expect to perform local analysis only.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file's stated purpose is chart drawing, but it also persists copies into an Obsidian directory and attempts cloud upload. This creates hidden side effects and unexpected data propagation, which is dangerous because users invoking visualization may unknowingly disclose trading activity, watchlists, or locally generated analysis artifacts to other storage locations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Invoking an external cloud-sync subprocess is unrelated to core chart rendering and expands the attack surface by depending on external binaries and networked side effects. In an agent skill context, this is especially risky because a simple analysis request can trigger outbound transfer from the host environment without the user's awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script uploads the chart to Baidu Cloud without prior notice or confirmation, which is an unauthorized outbound data transfer. In the context of a stock-analysis skill, uploaded filenames, timestamps, and chart contents may reveal user interests, trading research, or internal usage patterns to third-party storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document gives concrete trading actions, entry zones, stop-losses, targets, and position-management guidance without any explicit warning that the content is not financial advice and may lead to losses. In the context of an agent skill designed to analyze live market instruments, this can materially influence user decisions and create user-harm, compliance, and liability risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill documents capabilities to read environment variables, access local files, write reports, use the network, and run shell commands, but it declares no explicit tool scope or permissions boundary. In an agent environment, that creates an over-privileged skill that can access more data and perform more actions than users would reasonably expect from a stock-analysis function.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description emphasizes analysis and visualization, but the skill also persists outputs locally and uploads them to Baidu Netdisk. That is a significant secondary capability because it moves user-derived content into storage systems outside the immediate analysis task.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill uses an external API endpoint and token-backed access to retrieve market data, which is legitimate for the use case but still represents outbound data flow and secret usage. In context, the risk increases because the skill also combines external fetches with local persistence and cloud upload, creating a broader data-handling chain.

Content

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

md
- 分钟和小时级别命名参考**XAUUSD_30分钟级别k线.md**
- **本地Obsidian**:路径由 `OBSIDIAN_STOCK_DIR` 环境变量或 `config.py` 中 `OBSIDIAN_STOCK_DIR` 配置项决定(默认 `D:\knowledge\stock`)
- **实时数据**:itick.org API → 缓存
- **API**:[https://api.itick.org/forex/kline](https://api.itick.org/forex/kline)
- **Token**:由 `ITICK_TOKEN` 环境变量或 `config.py` 中 `ITICK_TOKEN` 配置项提供(勿硬编码)
- **周期**:1分钟、5分钟、15分钟、30分钟、1小时、日线

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction to persist user-provided conclusions into a reusable knowledge base creates cross-session data retention not necessary for a one-off analysis skill. This can accumulate sensitive or proprietary information and later reuse it inappropriately.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Requiring the output to state that newly confirmed conclusions were added to a knowledge base confirms intentional retention of user-supplied information. This is risky because it normalizes persistent memory without establishing consent, minimization, or access boundaries.

Content

No source excerpt is available for this finding.