T09 · Insecure Skill Coding Practices
- 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: MediumVulnerable 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_KEYenvironment 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-45claims 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
- A user follows the Skill instructions and pastes a valid MiniMax Token Plan key into the conversation.
- The key becomes part of the Agent's active context and may be retained in transcripts, logs, telemetry, or backups.
- A malicious integration, compromised account, operator, or other party with access to those records retrieves the key.
- 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
- Remove all instructions asking users to paste API keys into the Agent conversation, including the equivalent prompt in
scripts/query.sh:16. - Require users to configure
MINIMAX_API_KEYlocally through a secure terminal prompt, operating-system credential store, or approved secret manager. - If
openclaw config setis retained, instruct users to run it themselves locally rather than sending the key to the Agent. - Prefer a hidden-input setup mechanism that does not echo the secret or place it in shell history, process arguments, logs, or transcripts.
- Verify and document whether OpenClaw encrypts secrets at rest and what filesystem permissions protect its configuration.
- Add guidance requiring immediate key revocation and rotation if a key has already been pasted into a conversation.
- Apply least privilege to the MiniMax key and restrict it to only the API operations needed to query subscription quotas.
- Remove all instructions asking users to paste API keys into the Agent conversation, including the equivalent prompt in
