Back to skill

Security audit

A Stock Trading Assistant

Security checks for vulnerabilities and agentic risk

Overview

This A-share trading skill is coherent, but it needs review because it gives specific trading recommendations from plaintext market-data feeds and has limited controls around saved price alerts.

Review this skill carefully before relying on it for investment decisions. It can fetch and analyze A-share data, but some feeds are unauthenticated HTTP and the skill gives specific trading suggestions; verify quotes with a trusted broker or data provider and treat outputs as informational only. If using alerts, check what is saved in the watchlist and remove stale or sensitive entries.

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

Warning
Location
scripts/fetch_stock.py:111
Finding

Plaintext HTTP Transport Allows Manipulation of Financial Market Data

Content
View full analysis
dict: """抓取单只股票行情""" 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 # 备用:东方财富 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" ) ``` The index lookup also uses plaintext HTTP: ```python url = f"http://hq.sinajs.cn/list={symbols}" raw = fetch_url(url) ``` The sector-ranking lookup likewise uses plaintext HTTP: ```python 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" ) ``` ### Technical Analysis All implemented requests to Sina Finance and East Money use unencrypted HTTP. Consequently, `urllib.request.urlopen()` cannot authenticate the remote server or protect the integrity and confidentiality of the responses. An attacker positioned on the network path—such as an operator of a malicious Wi-Fi access point, a compromised router, an ISP-level interceptor, or another man-in-the-middle actor—can observe requested stock symbols and replace legitimate responses with forged but syntactically valid market data. The parsers trust externally returned stock names, prices, price changes, volume figures, index values ...[truncated 2126 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 (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger conditions are broad and include many common stock-related intents, which can cause the skill to activate when the user did not explicitly request this specialized assistant. In a financial context, incorrect auto-routing is risky because it may lead users to receive market-specific trading guidance, real-time data claims, or investment suggestions that are out of scope or not desired.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill hard-codes China-mainland A-share scope and Chinese-market handling without explicit user opt-in, which can override the user's actual market or language intent. This is especially problematic in a finance skill because silently constraining analysis to one market may produce misleading advice, ignore relevant securities, or mishandle user requests involving other exchanges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file gives explicit buy/sell style trading guidance such as '可做多', '买入信号', '卖出信号', and recommended position sizing by risk level, but it contains no warning that this is general educational content rather than financial advice and no disclosure of market risk. In a skill context, users may act on these recommendations as authoritative guidance, increasing the chance of financial harm, especially because the content presents simplified heuristics as strong signals.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

All headings and instructional content are written in Chinese, and the file does not indicate that the language is optional, user-selected, or required for a region-specific purpose. The policy for natural-language violations applies to all file types and allows locale constraints only when users are given a choice or the restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The entire reference is written in Chinese and includes no indication that language selection is optional or that the skill is intentionally restricted to Chinese-speaking users. Under the policy rule for natural-language constraints, this can be a locale/language preference imposed without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code hard-codes an Accept-Language header of zh-CN,zh;q=0.9, which enforces a specific language/locale preference for all HTTP requests. This is a natural-language locale constraint with no user opt-in or documented region-specific justification in the file.

Content

No source excerpt is available for this finding.