Back to skill

Security audit

HK Insurance Data 香港保险数据

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent paid Hong Kong insurance data connector, but its API-key and optional email-handling guidance deserves review before installation.

Install only if you are comfortable using this third-party paid insurance-data service. Configure the API key through a protected secret mechanism if possible, avoid pasting the raw token into chat, avoid storing it globally in shell startup files, and allow email access only with explicit, narrow permission for the verification message.

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
SKILL.md:31
Finding

Bearer API Key Exposed Through Agent Context and Plaintext Shell Configuration

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 31-40
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

bash
export HKINS_API_KEY=hkins_xxxx

The surrounding instructions tell the user to provide the API key to the agent and recommend persisting it in ~/.zshrc or ~/.bashrc.

Technical Analysis

The skill handles a bearer API key using two insecure practices:

  1. It asks the user to give the key to the agent, which may expose the credential to conversation history, model context, tool-call records, telemetry, or logs.
  2. It recommends storing the key in a plaintext shell startup file. Such files may be readable by other local processes, included in backups, collected in diagnostic bundles, or accidentally committed to a repository. Exporting the key also propagates it to descendant processes that do not necessarily require access.

A bearer token grants access based solely on possession. An attacker who retrieves it does not need an additional password or cryptographic proof to authenticate to the declared remote service.

Attack Path

  1. The user registers for the service and generates a bearer API key.
  2. Following the skill instructions, the user provides the raw key to the agent or inserts it into a shell startup file.
  3. The key is retained in conversation or tool logs, shell configuration, backups, process environments, or other accessible storage.
  4. An attacker or unauthorized local process obtains the key from one of these locations.
  5. The attacker sends requests to the remote MCP endpoint using the stolen bearer token.
  6. The attacker consumes the account's free or paid quota until the key is revoked or regenerated.

Impact Assessment

Exploitation grants the attacker the remote API privileges associated with the compromised key. This may allow unauthorized insurance-data queries, depletion of paid or free API quota, service disruption t ...[truncated 331 chars]

Remediation
View remediation

Remediation Suggestions

  • Never ask users to paste raw bearer tokens into conversations or agent prompts.
  • Direct users to configure the credential locally without exposing its value to the agent.
  • Prefer an operating-system keychain, a dedicated secret manager, or the MCP client's protected secret configuration.
  • If file-based storage is unavoidable, use a dedicated credential file outside the project directory and restrict it to the owning user, for example with permissions equivalent to 0600.
  • Avoid globally exporting the key from general-purpose shell startup files. Inject it only into the specific process that requires it.
  • Ensure credentials are redacted from command output, logs, error messages, telemetry, and diagnostic reports.
  • Document immediate key rotation if a token has been pasted into a conversation, committed to source control, or otherwise exposed.
  • Where supported, use scoped, short-lived, and revocable credentials with spending or quota limits.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger conditions are broad and natural-language based, so the skill may activate on loosely related user requests about Hong Kong insurance, returns, or product comparisons. Over-broad activation can cause unnecessary routing of user queries to a third-party paid MCP service, increasing the chance of unintended data disclosure, surprise external calls, or inappropriate commercial influence in responses.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The skill instructs the agent to send authenticated requests, including a bearer token, to an external MCP endpoint. Any external transmission is security-relevant because user prompts, derived query parameters, and sensitive credentials may be sent to a third-party service; in this skill's context, activation could also incur paid usage and expose insurance-related interests or analysis requests.

Content

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

export HKINS_API_KEY=hkins_xxxx # 写入 ~/.zshrc 或 ~/.bashrc

text

Hermes 用户也可以把此 MCP 挂为远程工具服务器(mcp_servers 配置,Streamable HTTP + bearer auth),或直接用下面的 curl 模式调用。

## 第三步:调用(JSON-RPC 2.0)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This natural-language guidance imposes a preferred language/locale expectation on use of the skill. While not a hard prohibition, it steers interaction toward Chinese without explicitly offering users a language choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.