Back to skill

Security audit

Clone Wizard

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its SenseAudio voice-cloning purpose, but it handles sensitive voice data with under-disclosed external uploads and includes an unsafe shell pattern for user-provided voice IDs.

Install only if you are comfortable sending voice recordings and cloned-voice identifiers to SenseAudio using your configured API key. The skill should ask before uploading audio or generating previews, and the shell examples should be hardened before use with untrusted voice_id values.

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:117
Finding

Shell Command Injection Through User-Controlled voice_id

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 117–132
Vulnerability Type: Shell command injection caused by unsafe interpolation
Risk Level: High

Vulnerable Code

bash
Once the user provides their voice_id, synthesize a welcome message so they can hear their AI voice for the first time:

Default preview text (warm and personal):
> "你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。"

```bash
curl -s -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"SenseAudio-TTS-1.0\",
    \"text\": \"你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。\",
    \"stream\": false,
    \"voice_setting\": { \"voice_id\": \"<VOICE_ID>\" },
    \"audio_setting\": { \"format\": \"mp3\" }
  }" -o preview.json

Technical Analysis

The workflow instructs the agent to accept a voice_id from the user and place it inside a JSON document embedded directly in a double-quoted shell argument. If the placeholder is replaced through direct textual interpolation, shell constructs in the supplied value can remain active.

In particular, command substitution expressions such as $(command) and backtick expressions are evaluated inside double quotes before curl is executed. JSON escaping does not prevent shell evaluation. Merely surrounding the resulting JSON with double quotes is therefore insufficient to treat the user-provided identifier as data.

Exploitation depends on an implementation following the documented substitution pattern directly rather than passing the identifier through a safe argument or structured JSON builder.

Attack Path

  1. An attacker supplies a crafted voice_id containing a shell command-substitution expression.
  2. The agent substitutes that value directly for <VOICE_ID> in the documented shell command.
  3. The shell evaluates the injected command substitution while const ...[truncated 940 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not construct JSON by interpolating user-controlled values into a shell command string.
  • Store the supplied identifier in a shell variable and use jq --arg to encode it as JSON data.
  • Validate voice_id against the provider's documented syntax, length, and character set before use. Validation should be defense in depth rather than the sole protection.
  • Pass the generated request through a file or standard input using --data-binary, avoiding shell re-evaluation.
  • Use curl --fail --silent --show-error so HTTP failures are reported reliably.
  • Avoid logging the API key or full authorization header.

Example hardened construction:

bash
jq -n --arg voice_id "$VOICE_ID" '{
  model: "SenseAudio-TTS-1.0",
  text: "你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。",
  stream: false,
  voice_setting: {voice_id: $voice_id},
  audio_setting: {format: "mp3"}
}' > request.json

curl --fail --silent --show-error \
  -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json \
  -o preview.json

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:124
Finding

Predictable Output Files and Unchecked API Response Handling

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 124–134
Vulnerability Type: Unsafe predictable files and insufficient error validation
Risk Level: Low

Vulnerable Code

bash
curl -s -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"SenseAudio-TTS-1.0\",
    \"text\": \"你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。\",
    \"stream\": false,
    \"voice_setting\": { \"voice_id\": \"<VOICE_ID>\" },
    \"audio_setting\": { \"format\": \"mp3\" }
  }" -o preview.json

jq -r '.data.audio' preview.json | xxd -r -p > my_voice_preview.mp3

Technical Analysis

The commands write to fixed filenames, preview.json and my_voice_preview.mp3, in the current working directory. Shell redirection and curl -o may follow pre-existing symbolic links. If the workflow runs in a shared or attacker-influenced directory, an attacker may prepare one of these paths as a symbolic link to another file writable by the skill account.

The request uses curl -s without --fail, so an HTTP error response may still be saved and processed as if it were successful. The pipeline does not verify the response schema, confirm that .data.audio is a valid nonempty string, check that it contains valid hexadecimal data, or ensure that the decoder succeeded before reporting that the preview is ready.

Attack Path

  1. An attacker gains the ability to create files in the directory where the skill executes.
  2. The attacker creates preview.json or my_voice_preview.mp3 as a symbolic link to another file writable by the skill account.
  3. The documented workflow runs and opens the predictable path for output.
  4. The operating system follows the symbolic link, causing the target file to be overwritten with an API response or decoded output.

Separately, an API authentication failure, service error, o ...[truncated 756 chars]

Remediation
View remediation

Remediation Suggestions

  • Create a private working directory with mktemp -d, verify creation succeeded, and restrict it to the current user with mode 0700.
  • Write all intermediate and output files inside that private directory.
  • Refuse to overwrite existing paths and avoid following symbolic links. Where supported, create output files atomically with exclusive-create and no-follow semantics.
  • Add --fail --silent --show-error to curl and stop processing when the request fails.
  • Validate that .data.audio exists, is a nonempty string, and matches the expected hexadecimal encoding before decoding it.
  • Check the exit status of every stage and only report success after confirming that the generated file is nonempty and has the expected media format.
  • Add cleanup handling for request and response files, especially if they can contain user or service data.

A hardened workflow should follow this structure:

bash
workdir=$(mktemp -d) || exit 1
chmod 700 "$workdir" || exit 1
trap 'rm -rf "$workdir"' EXIT

curl --fail --silent --show-error \
  -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @"$workdir/request.json" \
  -o "$workdir/preview.json" || exit 1

jq -e '.data.audio | type == "string" and length > 0' \
  "$workdir/preview.json" >/dev/null || exit 1

jq -r '.data.audio' "$workdir/preview.json" |
  xxd -r -p > "$workdir/my_voice_preview.mp3" || exit 1

test -s "$workdir/my_voice_preview.mp3" || exit 1
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
If `has_noise` is false or score < 0.2, skip the warning and proceed directly to Phase 3.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description hard-codes Chinese trigger phrases and positions the skill around those utterances, which may impose a specific language context without user opt-in. The file also centers the workflow in Chinese without stating that other languages are supported or allowing user choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to upload a user-provided voice recording to an external API for analysis without explicitly warning the user that their biometric voice data will leave the local environment. Voice samples are sensitive personal data, and silent transmission can create privacy, consent, and compliance risks even if the destination service is legitimate.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The quality-check phase sends the user's uploaded audio file to an external analysis endpoint. Because the file is a voice sample used in a cloning workflow, the transmission involves sensitive biometric-like personal data and should not occur without clear notice and consent.

Content

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

When the user uploads an audio file, run the quality check:

bash
RESULT=$(curl -s -X POST https://api.senseaudio.cn/v1/audio/analysis \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -F "model=sense-asr-check" \
  -F "file=@<AUDIO_FILE>")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The preview-generation step sends the user's supplied voice_id and synthesis text to an external API without clearly telling the user that this data will be transmitted to SenseAudio. Because voice_id links to a cloned voice profile and the text may contain personal content, this creates avoidable privacy and consent risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill defines a mandatory default preview utterance in Chinese and does not indicate that the user can choose another language or locale. This creates a natural-language policy concern because the skill forces a specific language for generated output without opt-in.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This finding duplicates the external-transmission issue on the synthesis endpoint: the skill posts user-associated data to SenseAudio without explicit consent language. The voice-cloning context increases sensitivity because misuse or misunderstanding could expose a personalized synthetic voice resource.

Content

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

"你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。"

bash
curl -s -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This finding duplicates the external-transmission issue on the synthesis endpoint: the skill posts user-associated data to SenseAudio without explicit consent language. The voice-cloning context increases sensitivity because misuse or misunderstanding could expose a personalized synthetic voice resource.

Content

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

"你好!这是我的 AI 声音。从今天起,我可以用这个声音说任何我想说的话了。"

bash
curl -s -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The skill uses the sensitive environment variable SENSEAUDIO_API_KEY in API requests, but the workflow text shown to the user does not disclose that the skill will access configured credentials to perform remote requests. While the manifest declares the credential requirement, the user-facing procedure lacks any notice tied to the action.

Content

No source excerpt is available for this finding.