Back to skill

Security audit

MiniMax Music Generation

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its music-generation purpose, but it includes under-scoped third-party sharing and avoidable credential/download handling risks that users should review before installing.

Install only if you are comfortable sending prompts, lyrics, and generated audio to MiniMax, and potentially to Feishu when sharing is used. Prefer MINIMAX_API_KEY over --api-key, avoid sensitive or proprietary lyrics/prompts, and only use Feishu sharing after confirming the recipient and token scope.

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

Warning
Location
scripts/minimax_music.py:277
Finding

API Credentials Can Be Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/minimax_music.py:151
Finding

Unvalidated API-Controlled Audio URL Permits Unsafe Outbound Requests and Unbounded Downloads

Content
View full analysis
str: """Download audio file from URL.""" print(f"Downloading audio to: {output_path}") response = requests.get(url, timeout=60) response.raise_for_status() with open(output_path, "wb") as f: f.write(response.content) file_size = os.path.getsize(output_path) print(f"Downloaded: {output_path} ({file_size / 1024 / 1024:.2f} MB)") return output_path ``` The URL originates from the MiniMax API response and is passed directly to the downloader: ```python data = result.get("data", {}) audio_url = data.get("audio", "") if args.download and audio_url: os.makedirs(args.download, exist_ok=True) timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") filename = f"minimax_music_{timestamp}.{args.format}" output_path = os.path.join(args.download, filename) download_audio(audio_url, output_path) ``` ### Technical Analysis The downloader accepts the API-provided `audio_url` without validating its scheme, destination host, resolved IP address, redirect chain, response content type, or content length. `requests.get()` follows HTTP redirects by default. Consequently, even an initially acceptable URL could redirect to an untrusted destination. If the MiniMax response or its delivery path were compromised, the returned URL could target: - Loopback services. - Private network addresses. - Link-local or cloud metadata endpoints. - An attacker-controlled server. - A server returning an unexpectedly large response. The use of `response.content` buffers the complete response in memory before writing it. The timeout constrains waiting time but does not impose a maximum response size, so a large or continuo ...[truncated 1854 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents use of environment variables, filesystem access, and outbound network requests, but the manifest declares no explicit tool scope or permissions. This weakens least-privilege controls and can allow the skill to be invoked with broader capabilities than users or the platform expect.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
---
name: minimax-music
description: "Generate AI music using MiniMax Music 2.5 API. Use when the user wants to: (1) generate instrumental/pure music, (2) generate songs with lyrics, (3) generate lyrics for songs. Supports various music styles (piano, pop, electronic, etc.) and Chinese/English lyrics. Triggers on phrases like '生成音乐', 'create music', '帮我写首歌', '生成纯音乐', 'AI作曲'."
---

# MiniMax Music Generation

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest uses broad trigger phrases like 'create music' and '帮我写首歌' without clear activation boundaries or confirmation requirements. This can cause overbroad routing, making the agent invoke a network-enabled skill in contexts where the user did not clearly consent to third-party processing or file generation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs sending generated audio to Feishu, but provides no privacy notice, consent step, or disclosure that user prompts, lyrics, or generated media may be transmitted to a third-party platform. This creates a real risk of unintended disclosure of user content and metadata.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This code performs an outbound upload of a generated audio file to Feishu. Even if functionality is intended, external transmission of generated content can leak sensitive lyrics, prompts, or embedded metadata if performed without explicit consent and proper scoping.

Content

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

md
# 1. Upload audio file
with open("music.mp3", "rb") as f:
    upload_resp = requests.post(
        "https://open.feishu.cn/open-apis/im/v1/files",
        headers={"Authorization": f"Bearer {TENANT_ACCESS_TOKEN}"},
        files={"file": ("music.mp3", f, "audio/mpeg")},

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

This request sends a message via Feishu referencing the uploaded file, which extends third-party disclosure beyond local generation. In the context of a skill, messaging actions can create unintended data sharing if triggered automatically or without clear user awareness.

Content

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

md
file_key = upload_resp.json()["data"]["file_key"]

# 2. Send file message
requests.post(
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
    headers={"Authorization": f"Bearer {TENANT_ACCESS_TOKEN}", "Content-Type": "application/json"},
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

This request sends a message via Feishu referencing the uploaded file, which extends third-party disclosure beyond local generation. In the context of a skill, messaging actions can create unintended data sharing if triggered automatically or without clear user awareness.

Content

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

md
file_key = upload_resp.json()["data"]["file_key"]

# 2. Send file message
requests.post(
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
    headers={"Authorization": f"Bearer {TENANT_ACCESS_TOKEN}", "Content-Type": "application/json"},
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/minimax_music.py (reported line 33)May include surrounding context.

python
# Configuration
# ============================================================================

API_BASE_URL = "https://api.minimaxi.com/v1"
MUSIC_GENERATION_URL = f"{API_BASE_URL}/music_generation"
LYRICS_GENERATION_URL = f"{API_BASE_URL}/lyrics_generation"
DEFAULT_MODEL = "music-2.5"

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/minimax_music.py (reported line 99)May include surrounding context.

python
"output_format": output_format
        }
        
        response = requests.post(
            MUSIC_GENERATION_URL,
            json=payload,
            headers=self._headers(),

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends user-provided prompts and lyrics to a third-party service but does not provide a clear user-facing privacy notice or consent checkpoint at the point of transmission. Because lyrics and prompts may contain sensitive or proprietary text, this can cause unintended data disclosure outside the local environment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/minimax_music.py (reported line 134)May include surrounding context.

python
"prompt": prompt
        }
        
        response = requests.post(
            LYRICS_GENERATION_URL,
            json=payload,
            headers=self._headers(),

Static analysis

No suspicious patterns detected.