Back to skill

Security audit

Openai Tts.Bak 2026 01 28T18:01:23+10:30

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward OpenAI text-to-speech wrapper, with some privacy and input-validation caveats users should understand before use.

Install only if you are comfortable sending the text you provide to OpenAI using your OPENAI_API_KEY. Avoid passing secrets, private data, or regulated content unless that disclosure is intended, and be aware that malformed or untrusted option values could alter the API request until validation is improved.

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
scripts/speak.sh:33
Finding

Unvalidated Command-Line Options Permit JSON Request-Body Injection

Content
View full analysis
&2 usage ;; esac done if [[ "${OPENAI_API_KEY:-}" == "" ]]; then echo "Missing OPENAI_API_KEY" >&2 exit 1 fi # Build JSON payload json=$(cat <
Remediation
View remediation
&2; exit 2 ;; esac case "$model" in tts-1|tts-1-hd) ;; *) echo "Invalid model" >&2; exit 2 ;; esac case "$format" in mp3|opus|aac|flac|wav|pcm) ;; *) echo "Invalid format" >&2; exit 2 ;; esac if ! [[ "$speed" =~ ^([0-3]([.][0-9]+)?|4([.]0+)?)$ ]] || ! awk -v value="$speed" 'BEGIN { exit !(value >= 0.25 && value <= 4.0) }' then echo "Invalid speed" >&2 exit 2 fi json=$(jq -n \ --arg model "$model" \ --arg input "$text" \ --arg voice "$voice" \ --arg format "$format" \ --argjson speed "$speed" \ '{ model: $model, input: $input, voice: $voice, response_format: $format, speed: $speed }') ``` 4. Add automated tests covering quotes, commas, braces, duplicate-property injection attempts, missing option values, non-numeric speeds, and out-of-range speeds. 5. Declare `jq` as a required binary in the skill metadata because the script depends on it for payload construction. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes shell-based scripts but does not declare an explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and can cause an agent framework to expose broader shell capability than users expect, increasing the risk of unintended command execution paths through the associated script.

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 text to OpenAI's external speech API, but the description does not clearly warn users that their input leaves the local environment. This can lead to accidental disclosure of sensitive or regulated data when users assume the skill is purely local text-to-speech.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The hardcoded remote endpoint indicates that user content is sent off-host to OpenAI. In the context of an agent skill, this can be more dangerous because upstream tools or users may automatically forward arbitrary text, including sensitive or regulated content, without realizing it leaves the system boundary.

Content

Scanner excerpt · scripts/speak.sh (reported line 78)May include surrounding context.

sh
if [[ "$out" == "" ]]; then
  # Output to stdout
  curl -sS https://api.openai.com/v1/audio/speech \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d "$json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The hardcoded remote endpoint indicates that user content is sent off-host to OpenAI. In the context of an agent skill, this can be more dangerous because upstream tools or users may automatically forward arbitrary text, including sensitive or regulated content, without realizing it leaves the system boundary.

Content

Scanner excerpt · scripts/speak.sh (reported line 78)May include surrounding context.

sh
if [[ "$out" == "" ]]; then
  # Output to stdout
  curl -sS https://api.openai.com/v1/audio/speech \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d "$json"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends user-supplied text to an external API but does not provide any runtime disclosure, confirmation, or warning that the content will leave the local environment. This is dangerous because callers may pass sensitive prompts, secrets, or personal data assuming local processing, resulting in unintended third-party disclosure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This second curl path also sends user-provided text to the same external API, differing only in that the audio response is written to a file. The file-output mode does not reduce the disclosure risk of the outbound request, so the same concern about unintended transmission of sensitive text applies.

Content

Scanner excerpt · scripts/speak.sh (reported line 85)May include surrounding context.

sh
else
  # Output to file
  mkdir -p "$(dirname "$out")"
  curl -sS https://api.openai.com/v1/audio/speech \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d "$json" \

Static analysis

No suspicious patterns detected.