Back to skill

Security audit

Bedtime Radio

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it creates bedtime-story audio through SenseAudio, with expected network/API-key use and no evidence of hidden persistence, privilege escalation, or unrelated data access.

Install only if you are comfortable sending the generated story text to SenseAudio using your API key. Avoid putting children's full names, addresses, school details, or other sensitive personal information into prompts, and prefer hardening the sample script with proper JSON encoding before use.

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

Warning
Location
SKILL.md:88
Finding

Unsafe JSON Construction Allows Request-Body Injection

Content
View full analysis
"$OUTFILE" echo "$(jq '.extra_info.audio_length' "${OUTFILE}.json")ms — $OUTFILE" } ``` ### Technical Analysis The function constructs the API request body by directly interpolating `TEXT`, `VOICE`, and `SPEED` into a manually quoted JSON document. These values are not JSON-encoded or validated before being inserted. `TEXT` contains LLM-generated story content influenced by user input. Double quotes, backslashes, literal control characters, or other JSON metacharacters within that content can terminate or alter the intended JSON string. For example, a generated text value resembling the following can introduce an additional property: ```text ", "unexpected_property": "attacker-controlled ``` The resulting request can contain attacker-influenced JSON structure rather than treating the entire value exclusively as story text. Ordinary dialogue containing quotation marks may also create malformed JSON and cause synthesis failures. Direct interpolation of `SPEED` without numeric validation similarly allows it to affect the surrounding JSON structure if the function is reused with an untrusted value. `VOICE` is placed inside a JSON string but is not encoded or restricted to the doc ...[truncated 2296 chars]
Remediation
View remediation
&2 return 1 ;; esac if ! [[ "$SPEED" =~ ^(0\.[0-9]+|1(\.0+)?)$ ]]; then echo "Invalid speed value" >&2 return 1 fi local PAYLOAD PAYLOAD=$(jq -n \ --arg text "$TEXT" \ --arg voice "$VOICE" \ --argjson speed "$SPEED" \ '{ model: "SenseAudio-TTS-1.0", text: $text, stream: false, voice_setting: { voice_id: $voice, speed: $speed }, audio_setting: { format: "mp3" } }') || return 1 if ! curl -sS --fail-with-body \ -X POST https://api.senseaudio.cn/v1/t2a_v2 \ -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \ -H "Content-Type: application/json" \ --data-binary "$PAYLOAD" \ -o "${OUTFILE}.json"; then echo "SenseAudio API request failed" >&2 return 1 fi if ! jq -e '.data.audio | type == "string" and test("^[0-9A-Fa-f]+$")' \ "${OUTFILE}.json" >/dev/null; then echo "SenseAudio API returned an invalid audio payload" >&2 return 1 fi jq -r '.data.audio' "${OUTFILE}.json" | xxd -r -p > "$OUTFILE" || return 1 jq -r '"\(.extra_info.audio_length)ms — \($outfile)"' \ --arg outfile "$OUTFILE" "${OUTFILE}.json" } ``` Additional hardening measures: 1. Set explicit minimum and maximum limits for text length before transmission. 2. Validate that `SPEED` falls within the exact range supported by the API. 3. Use a restrictive `umask` if generated audio or API responses may contain sensitive content. 4. Remove temporary JSON response files after successfu ...[truncated 242 chars]
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
94% confidence
Finding

The trigger scope is overly broad and includes a catch-all for essentially any child soothing story-audio request, which can cause the skill to activate in situations where the user did not clearly consent to this specific external-audio workflow. In context, that increases the chance of unintended collection and transmission of user-provided story content to the TTS provider.

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 directs the agent to ask for inputs and structure outputs entirely in Chinese, and all examples and required fields are Chinese-language only. Because the file does not offer a language choice or explain that the skill is intentionally limited to Chinese users, this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill directs sending generated or user-influenced story text to a third-party TTS API but does not require an explicit user warning or consent before network transmission. Because the content may include child-related details or personalized story elements, this creates a privacy and data-disclosure risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The explicit hardcoded third-party endpoint confirms that the skill depends on outbound network transfer to an external service. This is not inherently malicious, but without consent and privacy safeguards it exposes user-supplied or generated content outside the local environment.

Content

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

md
local SPEED="$3"
  local OUTFILE="$4"

  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
93% confidence
Finding

The explicit hardcoded third-party endpoint confirms that the skill depends on outbound network transfer to an external service. This is not inherently malicious, but without consent and privacy safeguards it exposes user-supplied or generated content outside the local environment.

Content

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

md
local SPEED="$3"
  local OUTFILE="$4"

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

Static analysis

No suspicious patterns detected.