Back to skill

Security audit

国泰海通证券-灵犀金融数据查询

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:10
Finding

Skill instructions suppress source review and mandate output manipulation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skill-entry.js:1
Finding

Untrusted configuration sources can redirect credentials and financial queries

Content
View full analysis
Remediation
View remediation

other

Warning
Location
skill-entry.js:1
Finding

Authorization flow collects and exposes a stable host MAC address

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

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

md
资金面数据:主力资金流向变动数据


| 场景分类           | 典型用户问题 (Intent)                     | 业务逻辑指导                                                                                                                                                                                                       |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **金融数据查询**     | "科大讯飞营业收入","查询科大讯飞营业收入和贵州茅台净利润"                  | 调用 `financial-search`。                                                                                                                                                                         |
|

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

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

md
| 场景分类           | 典型用户问题 (Intent)                     | 业务逻辑指导                                                                                                                                                                                                       |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **金融数据查询**     | "科大讯飞营业收入","查询科大讯飞营业收入和贵州茅台净利润"                  | 调用 `financial-search`。                                                                                                                                                                         |
|

### 问句示例

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

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.

Content

No source excerpt is available for this finding.