T01 · Skill Instruction Hijacking
- Location
SKILL.md:9- Finding
Instruction Attempts to Suppress Review of Executable Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This stock-screening skill is broadly coherent, but it handles reusable credentials and device identifiers with too much mutable configuration and under-disclosed local persistence.
Install only if you trust the publisher and the local environment. Before use, check that no untrusted gateway-config.json or GTHT_GATEWAY_CONFIG can redirect requests, understand that the skill stores a reusable API key in plaintext, and revoke or clear the key if the machine or workspace is shared.
SKILL.md:9Instruction Attempts to Suppress Review of Executable Source Code
skill-entry.js:1API Key Can Be Exfiltrated Through Attacker-Controlled Gateway Configuration
skill-entry.js:1Credential Files Are Searched and Modified Outside the Declared Skill Boundary
skill-entry.js:1Authorization Flow Collects and Transmits a Hardware MAC Address
skill-entry.js:1Reusable API Key Is Stored as Plaintext Without Explicit Access Restrictions
The declared description says this skill supports natural-language stock screening and historical backtesting. However, the provided code chunk is almost entirely infrastructure for authentication and generic MCP tool calling. It handles API key persistence, token parsing, QR/cloud auth instructions, polling for authorization results, loading gateway configs, and sending authenticated JSON-RPC requests. While there are example references to tools like financial-search and backtest, the code does not contain the actual stock-selection/backtesting implementation; instead it is a generic wrapper that can call arbitrary tools. This is a material mismatch because the actual behavior exposed by this code chunk includes undeclared auth-management and broad remote tool-invocation capabilities, while the declared purpose presents a specific stock-selection/backtesting skill.
The file first imposes a strict boundary limiting access to the skill directory and one sibling shared file, but later instructs the agent to search for or create API-key files across multiple parent directories. That contradiction weakens containment guarantees and can cause the agent to read from or write to unintended locations, exposing credentials or crossing workspace boundaries.
The file implements generic MCP/gateway tool invocation through sendJsonRpcRequest and mcpClient call paths, enabling access to remote tools beyond the narrowly described stock-selection function. Undeclared MCP capability is dangerous because it expands the skill's effective authority and may permit unexpected data access or remote actions through configured gateways.
The file implements generic MCP/gateway tool invocation through sendJsonRpcRequest and mcpClient call paths, enabling access to remote tools beyond the narrowly described stock-selection function. Undeclared MCP capability is dangerous because it expands the skill's effective authority and may permit unexpected data access or remote actions through configured gateways.
The manifest description says the skill is triggered by generic phrases including “选股”, “筛选股票”, “回测”, “选股策略”, and “筛选结果”. Several of these are broad everyday task phrases in a finance context, and the file does not provide explicit constraints or negative examples clarifying when the skill should not activate.
The file requires the agent to append fixed Chinese disclaimer text verbatim for financial and backtest responses. Because this is a hard requirement and no user language or locale opt-in is offered, it can violate language-choice policy for users operating in other languages.
The behavior section says all environments now use the cloud authorization page and that auth --channel only exists for compatibility and no longer changes the authorization method. However, the troubleshooting table later tells users to add or remove --channel depending on environment to generate PNG QR codes or terminal Unicode QR codes, implying that the flag still materially changes behavior.
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
选股结果回测:年化收益、最大回撤、胜率
| 场景分类 | 典型用户问题 (Intent) | 业务逻辑指导 |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **多指标选股** | "涨幅大于5%且换手率大于3%的股票","今天涨幅超过7%的强势股" | 调用 `financial-search`。 |
| **回测** | "帮我找出涨幅超5%的股票,并回测这个策略","筛选高换手股票,回测近一年表现" | 调用 `backtest`。 |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| 场景分类 | 典型用户问题 (Intent) | 业务逻辑指导 |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **多指标选股** | "涨幅大于5%且换手率大于3%的股票","今天涨幅超过7%的强势股" | 调用 `financial-search`。 |
| **回测** | "帮我找出涨幅超5%的股票,并回测这个策略","筛选高换手股票,回测近一年表现" | 调用 `backtest`。 |
|
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| 场景分类 | 典型用户问题 (Intent) | 业务逻辑指导 |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **多指标选股** | "涨幅大于5%且换手率大于3%的股票","今天涨幅超过7%的强势股" | 调用 `financial-search`。 |
| **回测** | "帮我找出涨幅超5%的股票,并回测这个策略","筛选高换手股票,回测近一年表现" | 调用 `backtest`。 |
|
The manifest describes a domain-specific stock-selection/backtesting skill, but the entry file primarily handles authorization, API-key storage, gateway loading, and generic tool dispatch. This mismatch is risky because it obscures the true behavior of the skill and makes review, consent, and least-privilege enforcement less effective.
The authorization flow gathers a MAC-derived device identifier, timestamp, and random suffix, and then displays or transmits this identifier as part of the QR/auth process. For a stock-selection skill, collecting local hardware fingerprint material is not clearly necessary and creates avoidable device-tracking and privacy exposure if logs or remote services are compromised.
The code saves the API key to a JSON file in cleartext and later reuses it automatically. Cleartext credential storage is dangerous because any local user, backup system, malware, or support bundle with file access can recover the key and impersonate the user against the remote gateway.
The auth flow prints MAC address, timestamp, full QR payload, device ID, and token values directly to the console. These values can be harvested from terminal logs, screenshots, shell history captures, or support transcripts and may enable session correlation, replay assistance, or credential abuse depending on backend semantics.
Nearly all CLI prompts, help text, and status messages are fixed in Chinese, which forces a specific language experience regardless of user preference. The file does not offer any locale selection, fallback, or documented justification for a Chinese-only interface.