Back to skill

Security audit

A Stock Trading Assistant

Security checks for vulnerabilities and agentic risk

Overview

This A-share trading assistant has a coherent purpose, but it stores sensitive alert preferences and gives actionable trading guidance from unauthenticated market data, so it should be reviewed carefully before installation.

Install only if you are comfortable with a China A-share-focused assistant that may save local watchlist or alert data and may base trading suggestions on unauthenticated market feeds. Treat outputs as research rather than financial advice, and prefer a version that uses verified HTTPS data sources and explicit user-controlled alert storage.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_stock.py:113
Finding

Unauthenticated HTTP Allows Market Data Manipulation

Content
View full analysis
dict: """Fetch a single stock quote.""" prefix, clean_code = get_market_prefix(code) symbol = f"{prefix}{clean_code}" url = f"http://hq.sinajs.cn/list={symbol}" raw = fetch_url(url) if raw: data = parse_sina_stock(raw, symbol) if data: return data # Fallback: Eastmoney market = 1 if prefix == "sh" else 0 url2 = ( f"http://push2.eastmoney.com/api/qt/stock/get" f"?secid={market}.{clean_code}" f"&fields=f43,f44,f45,f46,f47,f48,f57,f58,f60,f107,f169,f170,f171" ) raw2 = fetch_url(url2, {"Referer": "https://www.eastmoney.com"}) ``` ```python def fetch_index() -> list: """Fetch major market indices.""" symbols = "s_sh000001,s_sz399001,s_sz399006,s_sh000688" names_map = { "s_sh000001": "上证指数", "s_sz399001": "深证成指", "s_sz399006": "创业板指", "s_sh000688": "科创50", } url = f"http://hq.sinajs.cn/list={symbols}" raw = fetch_url(url) ``` ```python def fetch_hot_sectors() -> list: """Fetch leading Eastmoney concept sectors.""" url = ( "http://push2.eastmoney.com/api/qt/clist/get" "?pn=1&pz=20&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281" "&fltt=2&invt=2&fid=f3" "&fs=m:90+t:2+f:!50" "&fields=f2,f3,f4,f12,f14,f20,f128,f136,f207,f208,f209" ) raw = fetch_url(url, {"Referer": "https://www.eastmoney.com"}) ``` The reference documentation also explicitly directs cl ...[truncated 2882 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are very broad and include generic investment-related phrases, which can cause the skill to activate for ordinary financial conversations that may not require a high-risk trading workflow. In this context, over-triggering is dangerous because the skill is designed to provide market analysis and trading suggestions, so accidental invocation could lead to unsuitable financial guidance or unnecessary collection/use of user portfolio intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to record user alert settings into a local markdown file, but it does not require explicit notice, consent, retention limits, or access controls. This creates a privacy and persistence risk because user watchlists, price targets, and trading interests may be sensitive financial preference data that could be stored unexpectedly and exposed to later sessions or other components.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file gives concrete buy/sell timing signals, position sizing suggestions, and stock-selection heuristics without any warning that the material is general information rather than personalized financial advice. In an agent skill context, users may rely on this guidance for real-money decisions, increasing the risk of financial harm, regulatory issues, and unsafe overreliance on the agent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains only Chinese-language instructions and labels, which can amount to a language-policy constraint if users are not given an opt-in or alternative locale. The file does not state that the skill is region-specific or otherwise justify limiting guidance to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The HTTP headers force Accept-Language: zh-CN,zh;q=0.9, which encodes a specific locale preference in the skill behavior. The file also presents all user-facing descriptions and output in Chinese, but does not offer any language or locale choice or explain that the locale restriction is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description states the skill '专服务中国大陆股票市场' and '只处理沪深A股,自动忽略港股和美股,' which imposes a strict market/locale constraint in natural language. While the scope is clear, it does not offer a user choice or opt-in for broader language/locale handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All visible headings and instructions in this file are written in Chinese, and there is no indication that the user may choose another language or that the locale restriction is intentional and documented. The policy explicitly calls for flagging language or locale constraints when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.