T01 · Skill Instruction Hijacking
- Location
SKILL.md:10- Finding
Skill instructions suppress source review and mandate output manipulation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is related to financial data lookup, but it also handles credentials and remote gateway calls in ways that need careful review before installation.
Install only if you trust this publisher and are comfortable giving it API access to the financial-data service. Prefer QR authorization over sending an API key in chat, review or lock down gateway-config.json and GTHT_GATEWAY_CONFIG before use, and treat the stored gtht-entry.json file as a reusable secret that should be protected or deleted when no longer needed.
SKILL.md:10Skill instructions suppress source review and mandate output manipulation
skill-entry.js:1Untrusted configuration sources can redirect credentials and financial queries
skill-entry.js:1Authorization flow collects and exposes a stable host MAC address
The declared description says this skill is specifically for querying A-share financial data. However, the supplied code does not implement financial-data retrieval logic itself, nor does it contain finance-specific query handling, symbol lookup, F10 parsing, or market-data-specific business rules. Instead, it is largely an auth/bootstrap wrapper: it creates QR/cloud auth URLs, polls for authorization results, retrieves tokens/API keys from external endpoints, persists them to disk, clears them, and exposes a generic MCP client that can call arbitrary tools on configured gateways. While some of this may support a financial-query skill, these are substantial undeclared capabilities and the code’s primary observable purpose is authorization and generic tool dispatch rather than the declared finance-data query functionality.
The skill tells users to send API keys directly to the agent without a strong warning that the credential is sensitive. Asking for secrets in chat normalizes unsafe handling, increases the chance of credential capture in logs/transcripts, and can expose the key to the agent platform, operators, or downstream tooling.
This instruction explicitly asks the user to provide an API key directly in conversation to complete authorization. In a skill context, chat is typically not an appropriate secret-handling channel, so this creates a direct credential-exfiltration and retention risk.
The entrypoint implements an MCP client and JSON-RPC transport that can call tools over configured gateways, but this capability is not reflected in the declared permissions. Because the client accepts gateway and tool names from CLI input, it can act as a broader remote procedure caller than a narrow financial-query skill, increasing the risk of unauthorized network actions or misuse of other tools reachable through the gateway.
The entrypoint implements an MCP client and JSON-RPC transport that can call tools over configured gateways, but this capability is not reflected in the declared permissions. Because the client accepts gateway and tool names from CLI input, it can act as a broader remote procedure caller than a narrow financial-query skill, increasing the risk of unauthorized network actions or misuse of other tools reachable through the gateway.
The code exposes a generic MCP client that accepts arbitrary gateway names and tool names, then forwards JSON-RPC requests using stored credentials. In the context of a skill advertised as A-share financial search only, this broad dispatch mechanism materially expands scope and could be used to reach unintended backend tools or environments if gateway configuration is altered or additional tools exist.
The description says the skill should be tried whenever a user queries financial data and lists generic trigger keywords such as '财务数据', '财报', '营业收入', '净利润', and '公司信息'. Several of these phrases are common financial terms that could appear in broad conversation, and the file does not provide negative examples or explicit constraints distinguishing when the skill should not activate.
Allowing direct storage and use of user API keys broadens the attack surface compared with a safer delegated authorization flow. If the local file is read by another skill, user, or process, the credential can be reused to access financial-data services without the user's intent.
The skill first claims file access is strictly limited, then later instructs the agent to search multiple parent directories for gtht-entry.json. That contradiction weakens the file-boundary guarantee and can cause the skill to read credentials from unintended sibling or ancestor locations, increasing the risk of secret confusion or cross-skill credential reuse.
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) | 业务逻辑指导 |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **金融数据查询** | "科大讯飞营业收入","查询科大讯飞营业收入和贵州茅台净利润" | 调用 `financial-search`。 |
|
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) | 业务逻辑指导 |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **金融数据查询** | "科大讯飞营业收入","查询科大讯飞营业收入和贵州茅台净利润" | 调用 `financial-search`。 |
|
### 问句示例
The skill entrypoint includes a standalone authorization and token-management CLI with commands for auth, poll, check, and clear, which is outside the stated financial data query behavior. This hidden operational surface handles secrets, persists API keys to disk, and instructs users through out-of-band authorization flows, creating additional opportunities for misuse, confusion, and secret exposure not obvious from the manifest.
The code enumerates local network interfaces to obtain a MAC address and derives a device identifier for QR-based authorization. For a financial-search skill, this host-fingerprinting capability is not necessary to answer user queries and increases privacy risk by collecting stable device characteristics that can be used for tracking or correlation.
This JavaScript file contains extensive user-facing help text, status messages, and authorization instructions only in Chinese. Because the skill does not offer any language or locale selection, it effectively forces a specific language on users, which matches the natural-language locale policy violation criteria.
Line L010 states the agent only needs to read this file and does not need to read other source files. The rest of the document then relies on skill-entry.js, gateway-config.json, and gtht-entry.json for authorization and execution behavior, which makes the earlier instruction misleading about what the skill actually depends on.