Back to skill

Security audit

MiniMax CLI (mmx)

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent MiniMax CLI guide, but its install and authentication instructions create avoidable API-key exposure and supply-chain risks that users should review before installing.

Review before installing. Use a pinned, trusted mmx-cli release if possible, avoid pasting API keys into agent chats, avoid command lines that expose keys in shell history, and treat local files, prompts, image URLs, search queries, and callback URLs as data that may be sent to MiniMax or related services.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding
Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:14-15` **Vulnerability Type**: Supply-chain risk caused by an unpinned globally installed dependency **Risk Level**: Medium ### Complete Code Snippet ```bash npm install -g mmx-cli mmx auth login --api-key <your-api-key> ``` ### Technical Analysis The installation command retrieves and executes the latest available version of `mmx-cli` from the npm registry. It does not specify a reviewed version, verify package integrity, require npm provenance, or use a lockfile. npm installations can execute package lifecycle scripts. Because the package is installed globally, such scripts and the resulting executable run with the permissions of the user performing the installation. The GitHub URL mentioned elsewhere in the documentation does not cryptographically establish that the downloaded npm artifact corresponds to reviewed source code from that repository. This does not prove that the current `mmx-cli` package is malicious. However, the documented installation process creates an exploitable supply-chain boundary: compromise of the npm publisher, package release process, registry account, or a future release could introduce code that executes when users follow these instructions. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, or another component used to publish `mmx-cli`. 2. The attacker publishes a modified version under the expected package name. 3. A user or agent follows the Skill and runs `npm install -g mmx-cli` without a version constraint. 4. npm downloads the attacker-controlled release and may execute its installation lifecycle scripts. 5. The installed CLI subsequently executes with the user's privileges and can access credentials, local files supplied to the CLI, prompts, generated outputs, and network resources available to that user. ### Impact Assessment Successful exploitation would permit arbitrary code execution with the privileges of t ...[truncated 547 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin installation to an explicitly reviewed version, for example: ```bash npm install -g mmx-cli@<reviewed-version> ``` 2. Publish and verify the expected package version, integrity digest, npm publisher identity, and provenance. 3. Prefer a project-local installation with a committed lockfile over a global installation. 4. Install and execute the CLI in a least-privilege environment or isolated container when possible. 5. Disable npm lifecycle scripts during installation if the package does not require them: ```bash npm install --ignore-scripts mmx-cli@<reviewed-version> ``` 6. Verify that the npm package contents correspond to a signed and reviewed source release. 7. Document the trusted npm package scope, publisher, version, and checksum rather than relying only on a separate GitHub URL. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:15
Finding
API Key Exposure Through Command-Line Arguments and Agent Prompts<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:15-22` **Vulnerability Type**: Insecure handling of an API credential **Risk Level**: High ### Complete Code Snippet ```bash mmx auth login --api-key <your-api-key> ``` The subsequent agent-installation example also directs the user to provide the key as part of an AI-agent prompt using an equivalent placeholder. ### Technical Analysis The documented authentication command places the API key directly in a command-line argument. Depending on the operating system, shell, execution environment, and logging configuration, command arguments may be exposed through: - Shell history files. - Process-listing and system-monitoring tools. - Terminal session recording. - Agent command transcripts. - CI/CD logs and diagnostic output. - Endpoint monitoring or process telemetry. The adjacent installation guidance additionally encourages users to include the key in an AI-agent conversation. Agent prompts may be retained in conversation history, observability systems, debugging logs, or third-party model-provider records. Connected tools and integrations may also receive portions of the conversation context. A placeholder is used rather than a hardcoded real credential, so no actual secret is committed in the audited file. The vulnerability is the recommended credential-handling workflow. ### Attack Path 1. A user follows the documented instructions and substitutes a real MiniMax API key for the placeholder. 2. The key is entered as a visible command-line argument or pasted into an AI-agent prompt. 3. The credential is retained in shell history, process telemetry, conversation history, agent logs, or another monitoring system. 4. A local user, log reader, compromised integration, or unauthorized account obtains access to that retained data. 5. The attacker extracts the API key and authenticates to the MiniMax service. 6. The attacker makes unauthorized API requests, consumes the victim's quota, or access ...[truncated 739 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not instruct users to place API keys in AI-agent prompts, chat messages, scripts, or command-line arguments. 2. Change the authentication flow to read the key through hidden interactive input. 3. Where interactive input is unavailable, use a protected credential file or operating-system secret store with restrictive permissions. 4. If environment-variable authentication is supported, document its logging risks and avoid placing the assignment in shell history. 5. Ensure the CLI redacts credentials from errors, diagnostics, telemetry, process output, and configuration displays. 6. Store long-lived credentials only in an operating-system keychain or equivalent encrypted credential manager. 7. Recommend short-lived, narrowly scoped credentials where the service supports them. 8. Add explicit instructions to revoke and rotate any key previously pasted into a prompt or exposed through command history. 9. Ensure agent workflows request secrets through a dedicated secret-input mechanism that does not add the value to conversation context. ]]>
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)

Missing User Warnings

High
Confidence
95% confidence
Finding
The installation example explicitly tells the user to give an AI agent their API key in plain language, which normalizes secret disclosure to the agent layer. If followed, the key may be logged, retained in conversation history, exposed to downstream tools, or reused for unauthorized API consumption.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest describes the skill as being triggered for generating images, video, music, speech, using the MiniMax API, checking quota, and configuring/diagnosing mmx. However, the documentation also exposes text chat, image understanding/visual OCR-style extraction, and network search capabilities, which materially broaden the behavior beyond the manifest's stated scope.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger description is broad enough to match common user requests like generating media, querying usage, or diagnosing the CLI, which raises the chance of unintended activation. In an agent environment, over-broad triggering can cause external API calls, file processing, or network actions to occur when the user did not explicitly intend to use this tool.

Ssd 3

Medium
Confidence
97% confidence
Finding
The example prompt directly encourages users to embed a secret key in a message to the AI agent, which is a classic secret-handling anti-pattern. Because agent conversations are often logged and may be accessible to other tools or operators, this materially increases the likelihood of credential leakage and downstream account abuse.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill documents remote image URLs, web search, and callback URLs without warning that data may be sent to external services. In this context, users may unknowingly transmit local file contents, prompts, images, or task metadata to third-party infrastructure, creating privacy, compliance, and possible SSRF-style risk depending on how URL fetching is implemented by the CLI/backend.

Static analysis

No suspicious patterns detected.