Back to skill

Security audit

BGM Maker

Security checks for vulnerabilities and agentic risk

Overview

The skill’s music-generation purpose is legitimate, but its shell examples handle user-derived style text unsafely and can run indefinitely while polling the external API.

Review before installing. This skill appears intended for legitimate SenseAudio background-music generation, but it should be tightened before routine use: build request JSON with a JSON-aware tool such as jq, avoid substituting user-derived text into shell source, add explicit API/privacy disclosure, and bound polling with timeouts or retry limits.

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
SKILL.md:92
Finding

Shell Command Injection Through Unsafely Interpolated Style Data

Content
View full analysis
\", \"negative_tags\": \"vocals, lyrics, singing, spoken word\" }") TASK_IDS[$i]=$(echo $RESP | jq -r '.task_id') echo "Version $i task: ${TASK_IDS[$i]}" done ``` ### Technical Analysis The style value is derived from the user's natural-language description and is shown as being inserted directly into a double-quoted shell argument. The value is not encoded as JSON and is not safely separated from shell syntax. If an agent implements the documented placeholder by substituting the generated style directly into the command text before shell execution, an attacker can supply quotes, command substitutions, backticks, or shell control operators that terminate the intended JSON argument and introduce additional commands. A payload containing syntax such as `" ; ; echo "` could modify the resulting shell program. Even when command execution is not achieved, unescaped quotation marks, backslashes, control characters, or newlines can corrupt the JSON request or alter its fields. This makes the issue both a command-injection risk and an input-integrity flaw. ### Attack Path 1. An attacker submits a video or music description containing shell syntax designed to survive the style-generation step. 2. The agent incorporates the attacker-controlled text into one or more generated style strings. 3. The agent replaces `` in the documented command with that text. 4. The resulting command is passed to a shell. 5. Injected syntax terminates or modi ...[truncated 1034 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:107
Finding

Unbounded Polling Caused by Incorrect Shell Boolean Logic

Content
View full analysis
Remediation
View remediation
&2 break fi if ! STATUS=$(printf '%s\n' "$POLL" | jq -er '.status'); then echo "Invalid polling response for version $i" >&2 break fi if [ "$STATUS" = "SUCCESS" ] || [ "$STATUS" = "FAILED" ]; then break fi sleep 5 done RESULTS[$i]=$POLL done ``` Additionally: - Use a monotonic overall deadline rather than relying solely on an iteration count. - Apply bounded retries with backoff for transient HTTP failures. - Explicitly handle all documented terminal and error statuses. - Report a timeout to the user instead of silently continuing. - Consider polling the three tasks concurrently with a global concurrency and time limit if parallel behavior is required. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest says the skill triggers on several phrases 'or any request to generate music for a specific video scene, mood, or duration.' That fallback condition is broad and lacks clear boundaries or negative examples, which could cause unintended invocation for ordinary creative requests that mention scene, mood, or duration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends user-provided video descriptions to an external third-party API but does not clearly warn the user before transmission. This creates a privacy and consent risk, especially if users include sensitive, proprietary, or personal details in their scene descriptions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This code performs an external POST request to SenseAudio using user-derived content in the request body, transmitting the user's scene/style description to a third-party service. In this skill context, that behavior is expected for functionality, but it remains security-relevant because it can leak private or confidential content if users are not informed and data handling is not minimized.

Content

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

bash
for i in 1 2 3; do
  RESP=$(curl -s -X POST "https://api.senseaudio.cn/v1/song/music/create" \
    -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This code performs an external POST request to SenseAudio using user-derived content in the request body, transmitting the user's scene/style description to a third-party service. In this skill context, that behavior is expected for functionality, but it remains security-relevant because it can leak private or confidential content if users are not informed and data handling is not minimized.

Content

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

bash
for i in 1 2 3; do
  RESP=$(curl -s -X POST "https://api.senseaudio.cn/v1/song/music/create" \
    -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 113)May include surrounding context.

bash
for i in 1 2 3; do
  while true; do
    POLL=$(curl -s "https://api.senseaudio.cn/v1/song/music/pending/${TASK_IDS[$i]}" \
      -H "Authorization: Bearer $SENSEAUDIO_API_KEY")
    STATUS=$(echo $POLL | jq -r '.status')
    [ "$STATUS" = "SUCCESS" ] || [ "$STATUS" = "FAILED" ] && break

Static analysis

No suspicious patterns detected.