Back to skill

Security audit

LrshuAI Music Generation

Security checks for vulnerabilities and agentic risk

Overview

This music skill needs review because it forces direct Python execution and can send prompts, credentials, and selected local files to a configurable remote service beyond its music-only description.

Install only after reviewing the publisher and intended backend. Use a narrowly scoped TEAM_API_KEY, do not set TEAM_BASE_URL unless you fully trust the destination, and do not allow the skill to pass local file paths unless you intend those files to be uploaded. The direct-execution instruction should be removed or justified before routine use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:5
Finding

Forced Bypass of the Host Execution Mechanism

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
script/invoke_model.py:13
Finding

Arbitrary Local Files Can Be Encoded and Transmitted to a Remote Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
script/invoke_model.py:31
Finding

API Credential and User Data Are Sent to an Undocumented Configurable Endpoint

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tainted flow: 'endpoint' from os.getenv (line 39, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request destination is taken from the TEAM_BASE_URL environment variable and used directly for an authenticated POST request carrying the bearer token plus user prompt and optional base64-encoded local media. If an attacker can influence the environment or deployment configuration, they can redirect traffic to an arbitrary server and exfiltrate credentials and sensitive user-supplied content.

Content

Scanner excerpt · script/invoke_model.py (reported line 115)May include surrounding context.

python
print(f"Invoking model: {args.model} ...")
    try:
        response = requests.post(endpoint, headers=headers, json=payload)
        response.raise_for_status()
        result = response.json()

Tainted flow: 'poll_endpoint' from os.getenv (line 132, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The polling URL is derived from the same environment-controlled base URL and is queried repeatedly with the Authorization header attached. This enables sustained credential disclosure and continued transmission of workflow metadata to an attacker-controlled endpoint if the base URL is tampered with.

Content

Scanner excerpt · script/invoke_model.py (reported line 136)May include surrounding context.

python
while True:
            time.sleep(3) # 每3秒查询一次
            poll_resp = requests.get(poll_endpoint, headers=headers)
            poll_resp.raise_for_status()
            poll_data = poll_resp.json()

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose is music generation, but the behavior indicates a more general remote model client with support for image and video inputs and model-specific polling/parameter handling. This mismatch is dangerous because it can conceal broader data egress and execution pathways than the user or reviewer expects, increasing the chance of misuse or covert invocation of unrelated multimodal capabilities.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · script/invoke_model.py (reported line 11)May include surrounding context.

python
import os
import sys
import argparse
import base64
import requests
import json
import mimetypes
import time

def parse_args():
    parser = argparse.ArgumentParser(description='Invoke Team AI Models via unified API')
    parser.add_argument('--model', type=str, required=True, help='The model ID to use (e.g., qwen3_5-plus, sora-2, etc.)')
    parser.add_argument('--prompt', type=str, required=True, help='The prompt text to send to the model')
    parser.add_argument('--image', type=str, help='Path to the local image file or remote image URL (First frame)')
    parser.add_argument('--image-tail', type=str, help='Path to the local image file or remote image URL (Tail/Last frame)')
    parser.add_argument('--video', type=str, help='Path to the local video fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill requires environment access via TEAM_API_KEY and appears to perform remote model invocation, but it declares no explicit tool scope or allowed-tools policy. This weakens containment and reviewability, making it easier for an agent to invoke code and networked behavior without clear authorization boundaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language content in the description and operating instructions is written entirely in Chinese, which effectively constrains use to a specific language. The file does not offer an opt-in, alternative language, or justification that this is a region-specific skill, so it may violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says this skill should be used to generate complete music tracks from text descriptions or style requirements. However, the script exposes a generic '--model' interface and explicitly supports image and video inputs, including image-to-video workflows, which is broader than and different from a music-generation-only skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script reads local image and video files, accepts remote image/video URLs, and contains special handling for image-to-video models such as 'vidu-i2v-viduq2' and 'kling-v3'. These capabilities are unrelated to generating music from text or style prompts and therefore exceed what the manifest's stated purpose would justify.

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 · script/invoke_model.py (reported line 115)May include surrounding context.

python
print(f"Invoking model: {args.model} ...")
    try:
        response = requests.post(endpoint, headers=headers, json=payload)
        response.raise_for_status()
        result = response.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script uploads prompts and optionally full local image/video contents to a remote API, but provides no explicit consent flow, warning, or clear disclosure at the point of transmission. In a skill context, this can cause users or calling agents to unknowingly transmit sensitive local data off-host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script's user-facing output and inline descriptive text include both English and Chinese, such as comments and operational messaging around the remote server and polling behavior. Because the skill does not state that it is intended for a Chinese-speaking audience or offer a language/locale option, this creates a natural-language policy issue around implicit locale assumptions.

Content

No source excerpt is available for this finding.