Back to skill

Security audit

MiniMax Token Plan 余额查询

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised MiniMax quota check, but it asks users to paste an API key into chat and encourages local credential storage with limited disclosure.

Review before installing. If you use it, do not paste your MiniMax API key into chat; configure a least-privilege key locally, understand where OpenClaw stores it, and rotate the key if it has already been shared in a conversation. Expect the script to send the key to MiniMax's quota endpoint and return raw API output rather than the polished report shown in the skill text.

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:29
Finding

API Key Requested Through the Agent Conversation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:29
Vulnerability Type: Sensitive credential exposure through chat context
Risk Level: Medium

Vulnerable Code Snippet

markdown
复制 Key 后直接粘贴给我,我会问你选择:

English translation: “After copying the key, paste it directly to me, and I will ask you to choose.”

Technical Analysis

The Skill instructs users to paste a live MiniMax API key directly into the Agent conversation. This places the credential in model context, conversation history, application logs, telemetry, backups, and potentially third-party integrations that can access transcripts.

Passing the key through the conversation is unnecessary. The query script already reads it from the MINIMAX_API_KEY environment variable and does not require it as a command-line argument. The instruction therefore exceeds the minimum disclosure needed for the declared quota-query functionality.

Although SKILL.md:44-45 claims that saved keys remain local and are not displayed in plaintext, the project does not contain OpenClaw's configuration implementation, so those storage guarantees cannot be independently verified in this audit.

Attack Path

  1. A user follows the Skill instructions and pastes a valid MiniMax Token Plan key into the conversation.
  2. The key becomes part of the Agent's active context and may be retained in transcripts, logs, telemetry, or backups.
  3. A malicious integration, compromised account, operator, or other party with access to those records retrieves the key.
  4. The party reuses the Bearer credential against MiniMax APIs until the key expires or is revoked.

This path does not require local privilege escalation; it depends on unauthorized access to any system retaining or processing the conversation.

Impact Assessment

Exposure can allow unauthorized API requests under the affected MiniMax account and possible consumption of resources available to the Token Plan key. Th ...[truncated 401 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove all instructions asking users to paste API keys into the Agent conversation, including the equivalent prompt in scripts/query.sh:16.
  2. Require users to configure MINIMAX_API_KEY locally through a secure terminal prompt, operating-system credential store, or approved secret manager.
  3. If openclaw config set is retained, instruct users to run it themselves locally rather than sending the key to the Agent.
  4. Prefer a hidden-input setup mechanism that does not echo the secret or place it in shell history, process arguments, logs, or transcripts.
  5. Verify and document whether OpenClaw encrypts secrets at rest and what filesystem permissions protect its configuration.
  6. Add guidance requiring immediate key revocation and rotation if a key has already been pasted into a conversation.
  7. Apply least privilege to the MiniMax key and restrict it to only the API operations needed to query subscription quotas.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior around saving API keys locally and presenting parsed quota details does not match the described implementation, which reportedly only calls a single remains endpoint and returns raw results. Security-relevant behavior mismatches are dangerous because users may disclose secrets under assumptions about storage, processing, and output that are not actually enforced.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/query.sh (reported line 26)May include surrounding context.

sh
URL="https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains"

RESULT=$(curl -s -X GET "$URL" \
    -H "Authorization: Bearer $AUTH_VALUE" \
    -H "Content-Type: application/json")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill instructs use of a shell-capable command (openclaw config set) to persist a sensitive API key, yet the manifest does not declare any tool restrictions or allowed-tools scope. In a tool-using agent environment, missing scope boundaries increases the chance of unintended or excessive shell access and makes secret-handling behavior harder to audit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill encourages local persistence of an API key but provides only limited safety guidance, while asserting reassuring claims such as local-only storage and non-plaintext display. Insufficient risk disclosure around credential storage can mislead users into storing secrets without understanding local compromise risks, rotation requirements, or who can later access the configured environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Broad trigger phrases like generic quota-query language can overlap with normal conversation and cause accidental invocation. In a skill that may prompt for or use stored API credentials, unintended activation can expose account metadata or lead users into secret-sharing flows they did not intend to start.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline guidance presents two options: a single-use query without saving, or saving locally for future queries. However, the actual code immediately exits when MINIMAX_API_KEY is absent and provides no mechanism to read a key from stdin, prompt interactively, or accept an ephemeral input source, so the documented one-time path is not implemented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

整份技能描述、示例触发语和输出格式均默认要求中文交互,但没有说明是否支持其他语言,也没有向用户提供语言选择或显式的中文限定理由。根据语言/区域策略,默认强制单一语言而无用户选择可能构成自然语言层面的策略问题。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The script uses the sensitive environment variable MINIMAX_API_KEY to make an HTTP request to the MiniMax API. While the comments describe key handling and leakage avoidance, there is no runtime disclosure or confirmation that the key will be transmitted over the network as part of the request.

Content

No source excerpt is available for this finding.