Back to skill

Security audit

Local Tts Publish V2

Security checks for vulnerabilities and agentic risk

Overview

This TTS skill is purpose-aligned, but users should know cloud mode sends text to Microsoft services and the Azure helper appears broken as packaged.

Install only if you are comfortable sending synthesized text to Microsoft-operated TTS services by default. Use --offline for sensitive text, keep Azure keys out of version control, and fix or review scripts/azure_tts.py before relying on the Azure channel.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code largely matches the general TTS purpose: it converts text to speech, outputs audio files, supports playback, lists voices, and falls back to an offline engine. However, the declared description materially overstates the implemented behavior by claiming a third synthesis channel via Azure Speech official API, including broader Chinese voice availability and unlocking voices unavailable in edge-tts. No Azure authentication, SDK usage, HTTP calls, or Azure-specific configuration exists in the supplied code. Therefore the description does not accurately represent the actual implemented capabilities.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and documents access to environment variables, outbound network calls, and shell-based execution patterns, but it does not declare any corresponding tool scope or permissions boundary. In an agent ecosystem, this weakens reviewability and enforcement, making it easier for the skill to access secrets or external services without explicit operator awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill makes cloud TTS the default path, meaning user-provided text is sent to external Microsoft-operated services unless --offline is explicitly chosen, but the documentation does not present this as a clear privacy/data-handling warning. This is dangerous because users or agents may unknowingly submit sensitive prompts, summaries, or regulated content to third-party services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The generated SSML always sets xml:lang="zh-CN", and the CLI defaults are centered on Chinese voices and Chinese-only listing behavior. This imposes a specific language/locale choice in the skill behavior without any explicit opt-in or justification visible in the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script loads an Azure subscription key from local credential files and then sends user-provided text to the Azure Speech TTS service over HTTP requests. While the module docstring explains where credentials are read from, there is no explicit user-facing warning that input text leaves the local system or that cloud credentials are being used.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI help says --play uses winsound playback with '不阻塞等待播完' (does not block waiting for completion). However, play_audio() explicitly uses synchronous playback and its docstring states it blocks until completion, matching the code at L137. This is an active contradiction in the skill's own documentation about runtime behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/tts.py (reported line 145)May include surrounding context.

python
def subprocess_check(*cmd):
    import subprocess
    r = subprocess.run(list(cmd), capture_output=True, text=True)
    if r.returncode != 0:
        raise RuntimeError(f"命令失败: {' '.join(cmd)}\n{r.stderr[:300]}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The changelog repeatedly describes the skill in Chinese and emphasizes Chinese voices/features, with no indication that users can select another language or that the skill is intentionally limited to a Chinese-only audience. Under the policy rule for language/locale constraints, this can be interpreted as a natural-language locale restriction lacking explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The user-facing message states that only Chinese voices are listed here and directs users elsewhere for other languages, while the script’s defaults and help text are entirely Chinese-centric. This creates a natural-language locale bias without an explicit user opt-in or a clearly documented region-specific justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.