Back to skill

Security audit

Podcast Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill’s podcast-generation purpose is coherent, but its documented audio-generation command can turn generated or web-influenced script text into local shell commands.

Review this skill before installing. Avoid using it with sensitive topics or proprietary content, and do not follow its heredoc shell pattern for writing generated scripts; a safer implementation should write content as data through a file API or stdin and should validate the TTS script path before execution.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:156
Finding

Command Injection Through a Fixed Shell Heredoc Delimiter

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 156–176
Vulnerability Type: Shell command injection through generated content
Risk Level: High

bash
# 1. Define the output path using a temporary directory and timestamp
OUTDIR=$(mktemp -d)
OUTFILE="$OUTDIR/podcast_$(date +%Y%m%d_%H%M%S).mp3"
SCRIPTFILE="$OUTDIR/script.txt"

# 2. Write the generated script
cat > "$SCRIPTFILE" << 'SCRIPT'
&lt;generated script content&gt;
SCRIPT

# 3. Locate the xfyun-tts script
TTS_SCRIPT=$(openclaw skills path xfyun-tts 2>/dev/null || find ~/.openclaw -name "tts.py" -path "*/xfyun-tts/*" 2>/dev/null | head -1)

# 4. Synthesize the audio
python3 "$TTS_SCRIPT" \
  --voice &lt;selected VCN&gt; \
  --output "$OUTFILE" \
  --speed 48 \
  --volume 55 \
  --file "$SCRIPTFILE"

echo "$OUTFILE"

Technical Analysis

The Skill instructs the agent to interpolate generated podcast text directly into a shell heredoc with the fixed delimiter SCRIPT. Quoting the opening delimiter prevents parameter expansion, command substitution, and backslash processing within ordinary heredoc content. It does not, however, prevent a line containing only SCRIPT from ending the heredoc.

Podcast text is derived from user input and externally fetched search results. An attacker-controlled topic or prompt-injected search result could therefore cause the generated content to contain the terminator on its own line. Any subsequent generated lines would be parsed by the shell as commands rather than written to the script file.

The use of mktemp -d and quoted file variables protects the temporary paths but does not address injection into the shell program itself.

Attack Path

  1. An attacker supplies a crafted podcast request, or places malicious instructions in content retrieved by the Skill from a search engine.
  2. The untrusted content influences the generated podcast script.
  3. The resulting script includes a l ...[truncated 1003 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not interpolate model-generated or externally influenced content into executable shell source.
  • Write the podcast text with a structured file-writing API that accepts the destination path and content as separate data values.
  • If a subprocess must perform the write, pass the content through standard input to a fixed command rather than constructing a shell script around it.
  • Avoid treating random or dynamically selected heredoc delimiters as the primary defense; delimiter collision checks are fragile and still leave generated content embedded in shell syntax.
  • Keep the temporary directory creation through mktemp -d, quote every path, and set restrictive permissions such as umask 077 before creating files that may contain sensitive user content.
  • Treat fetched web content as untrusted data. Do not follow instructions embedded in search results, and ensure source material can influence only the podcast content—not tool selection, shell commands, file paths, or execution flow.
  • Invoke the resolved TTS program using a direct process-execution API with an argument array rather than through a shell.
  • Validate that the resolved TTS path points to the expected installed Skill directory and an approved regular file before execution.
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 (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases include very broad terms like “播客”, “podcast”, and “帮我做一段音频”, which are likely to appear in normal conversation and can invoke the skill unintentionally. Because this skill performs external web retrieval and TTS generation, accidental activation can cause unintended data transmission and actions on the user’s behalf.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description and workflow are written to generate Chinese-language podcast scripts by default, with Chinese trigger phrases and Chinese-oriented script normalization rules, while only treating English as a special case later. This creates a locale/language default without offering the user an explicit language choice or documenting the constraint as a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly sends user-derived content to external search engines and a third-party TTS provider, but the description does not warn users that their prompts and generated script content may leave the local environment. This creates a privacy and consent risk, especially if users include sensitive topics, names, or proprietary information in the podcast request.

Content

No source excerpt is available for this finding.