Back to skill

Security audit

MiniMax Token Used Query

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its MiniMax quota-checking purpose, but it stores account credentials in plaintext and uses a real browser profile in ways that deserve manual review before installation.

Review this skill before installing. It is not showing exfiltration or destructive behavior, but it can reuse a real Chrome session, ask for login factors, store a MiniMax password in a plaintext OpenClaw memory file, and leave an account screenshot in /tmp. Prefer a version that uses an existing browser session only, avoids password persistence, stores secrets in an OS keychain if needed, narrows triggers to explicit MiniMax quota requests, and removes automatic screenshots.

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

T09 · Insecure Skill Coding Practices

Error
Location
quick.sh:138
Finding

MiniMax credentials stored persistently in plaintext

Content
View full analysis

Vulnerability Details

File Location: quick.sh:19-25, 135-140
Vulnerability Type: Plaintext credential storage
Risk Level: High

Vulnerable Code

bash
MEMORY_FILE="/home/allen/.openclaw/workspace/memory/minimax-login.txt"
PHONE=""
PASSWORD=""

if [ -f "$MEMORY_FILE" ]; then
    PHONE=$(grep "phone=" "$MEMORY_FILE" | cut -d'=' -f2)
    PASSWORD=$(grep "password=" "$MEMORY_FILE" | cut -d'=' -f2-)
fi
bash
# If a password is available, save it to memory
if [ -n "$PASSWORD" ]; then
    echo "💾 Saving credentials to memory..."
    echo "phone=$PHONE" > "$MEMORY_FILE"
    echo "password=$PASSWORD" >> "$MEMORY_FILE"
    chmod 600 "$MEMORY_FILE"
fi

Technical Analysis

The script writes the user's MiniMax phone number and account password directly to a persistent text file. Although the file is subsequently assigned mode 600, its contents remain unencrypted and accessible to every process operating under the same local user account. The file may also be exposed through backups, Agent workspace collection, debugging tools, or another skill with filesystem access.

Applying permissions only after writing also creates a potential exposure window. The initial redirection creates the file according to the process umask before chmod 600 is executed. If the script terminates between these operations or the umask permits broader access, the credential file may retain unsafe permissions.

The file is located in an Agent memory directory even though it contains authentication material rather than non-sensitive state. This increases the chance that credentials will be included in memory processing, workspace synchronization, or diagnostic collection.

Attack Path

  1. A user runs quick.sh with password-based MiniMax authentication.
  2. The script writes the phone number and password to /home/allen/.openclaw/workspace/memory/minimax-login.txt.
  3. An attacker obtains same-use ...[truncated 685 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove all logic that stores passwords in minimax-login.txt or any other plaintext workspace or memory file.
  • Prefer the authenticated browser session already maintained by the dedicated browser profile.
  • If persistent authentication material is unavoidable, store it in an operating-system credential manager or secret service and retrieve it only when needed.
  • Prefer short-lived, revocable, narrowly scoped session tokens over reusable account passwords where the service supports them.
  • Use interactive password entry with hidden terminal input, such as read -s, rather than persisting the password.
  • Delete existing plaintext credential files and advise affected users to rotate any password previously stored there.
  • Keep authentication material outside Agent memory, logs, backups, and synchronized workspace directories.
  • For any remaining sensitive file creation, set umask 077 before creation and create the file atomically with restrictive permissions rather than correcting permissions afterward.

T09 · Insecure Skill Coding Practices

Warning
Location
quick.sh:202
Finding

Authenticated account screenshot written to a predictable shared temporary path

Content
View full analysis

Vulnerability Details

File Location: quick.sh:202
Vulnerability Type: Unsafe temporary file containing sensitive information
Risk Level: Medium

Vulnerable Code

bash
browser-use --browser real --profile "Default" screenshot /tmp/minimax-token-query.png 2>/dev/null

Technical Analysis

The script captures an authenticated MiniMax account page and writes it to the fixed path /tmp/minimax-token-query.png. The screenshot operation is not necessary for the declared token-usage query and may record account identifiers, subscription details, quota information, or other content visible in the authenticated browser.

The path is globally predictable and is located in a shared temporary directory. The script does not create a private temporary directory, verify that the destination is not a symbolic link, enforce restrictive file permissions, or remove the screenshot after use. Repeated executions also overwrite or reuse the same location, leaving sensitive data on disk beyond the execution lifetime.

Depending on the screenshot tool's destination-handling behavior and platform protections, an attacker may monitor the known path, access a permissively created file, or prepare a conflicting path or symbolic link before execution.

Attack Path

  1. A local attacker identifies the fixed /tmp/minimax-token-query.png destination.
  2. The victim runs quick.sh while authenticated through the default Chrome profile.
  3. The Skill captures the authenticated MiniMax page and writes it to the predictable path.
  4. The attacker reads the resulting file if its effective permissions permit access, retrieves it through another same-user process, or observes the persistent artifact after execution.
  5. The attacker obtains the account and plan information visible in the screenshot.

A secondary path may exist if browser-use follows symbolic links: an attacker pre-creates the predictable destination as a link, and ...[truncated 553 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove automatic screenshot generation because it is not required to return token-usage data.
  • If a screenshot is explicitly requested, create a private temporary directory using mktemp -d after setting umask 077.
  • Use a randomized filename inside that private directory rather than a fixed path directly under /tmp.
  • Verify that the destination is a newly created regular file and is not a symbolic link.
  • Apply mode 600 to the screenshot and mode 700 to its containing directory.
  • Delete the screenshot immediately after its intended use and install a shell trap to ensure cleanup on normal exit, interruption, or failure.
  • Inform the user before capturing an authenticated page and obtain explicit consent if the image will be retained.
  • Consider using a dedicated MiniMax-only browser profile to reduce the amount of unrelated authenticated information exposed to browser automation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (15)

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly instructs saving user-supplied login credentials into persistent memory at '~/.openclaw/workspace/memory/minimax-login.txt' for automatic reuse. This is dangerous because persistent local credential storage creates a durable secret exposure point; if the file is readable by other processes, users, backups, or logs, an attacker can recover credentials and take over the MiniMax account.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill documents automatic saving of login credentials to a local file in persistent memory for future reuse, but does not describe secure storage, encryption, access controls, or explicit informed consent. Storing credentials in plaintext or weakly protected local files materially increases the risk of account compromise, credential theft, and unauthorized reuse by other local processes or users.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script writes the user's phone number and password to disk in plaintext, creating a durable secret that can be stolen by other local processes, backups, or workspace access. Although file permissions are tightened afterward, plaintext persistence in a predictable path still materially increases credential exposure risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad everyday-language queries such as '还有多少 token' and 'token 百分比', which can cause the skill to activate in contexts where the user did not explicitly consent to browser automation or credential-handling behavior. In this skill, accidental activation is more dangerous because execution may open a browser, interact with an authenticated session, and potentially prompt for or reuse stored credentials.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill logic says that when login is required it clicks the SMS-login tab, requests a verification code, and logs in with that code. Later documentation describes an optimized default flow that dynamically finds a password field and performs password login instead, which is a materially different authentication behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The login instructions specify that the phone number country code defaults to +86, which imposes a locale-specific assumption without documenting user choice or justification. This can violate language/locale policy expectations when the skill is used by users outside that region.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script reads document.body.innerText from a currently open real browser profile via a shell command, which can capture sensitive data from the user's authenticated session without any explicit consent prompt or scope restriction. In this skill context, the browser profile is reused (--profile "Default"), making it more dangerous because it can access whatever page the user already has open, including account or personal data beyond the intended token usage information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script explicitly prompts the user for a phone number and verification code during a login flow, but those values are not actually used by the script and are collected in a shell context without any clear handling, masking, or disposal guarantees. In a skill/agent setting, prompting for authentication factors is risky because users may disclose sensitive credentials to automation they do not fully trust, and the surrounding browser automation/profile access increases the sensitivity of the flow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script advertises itself as a quick token-query helper, but it also performs automated login and manages account credentials. That mismatch reduces informed user consent and can cause users to run a script with broader account-access behavior than expected, which is a meaningful security concern in an agent skill context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script's comments and user-facing prompts are entirely in Chinese, including all runtime interaction messages, with no indication that the skill is region-specific or that users can opt into another language. This can violate language/locale policy when a specific language is imposed without user choice or documented justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script reads a phone number and password from a local memory file and uses them for automated login without clear notice or consent at runtime. In an agent environment, silently consuming stored credentials increases the risk of unauthorized account access if the workspace, profile, or script is invoked by another task or user.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · quick.sh (reported line 140)May include surrounding context.

sh
echo "💾 保存凭据到 memory..."
        echo "phone=$PHONE" > "$MEMORY_FILE"
        echo "password=$PASSWORD" >> "$MEMORY_FILE"
        chmod 600 "$MEMORY_FILE"
    fi
fi

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

Early documentation frames the skill as browser-only automation that simulates manual access, and the dependencies section emphasizes a locally logged-in browser or manual code entry. However, later sections describe a default password-based login flow with persisted credentials, which changes the operational intent from simple session reuse/manual login assistance to active credentialed authentication management.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Multiple comments and console messages are written only in Chinese, which imposes a specific language on users without any opt-in or alternative. This matches the language/locale policy concern for natural-language content embedded in code.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script's comments and interactive/user-visible output are written in Chinese, with no option for the user to choose another language. This can violate a language/locale policy when a skill imposes a specific language without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
query-quick.js:14