Back to skill

Security audit

Byted Text To Speech

Security checks for vulnerabilities and agentic risk

Overview

This text-to-speech skill mostly matches its stated purpose, but it includes under-disclosed credential management and configurable network destinations that could expose API keys and submitted text.

Review before installing. Only use this skill with non-sensitive text unless you trust the configured TTS provider endpoint, avoid setting custom API base variables unless required, and do not store live API keys in a workspace .env that may be committed or shared. The credential-listing/creation fallback should be removed or explicitly consented to before broad 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api_key.py:104
Finding

Configurable Credential-Management Endpoint Enables ARK Bearer Token Disclosure

Content
View full analysis
dict | None: if not url: return None data = json.dumps(payload, ensure_ascii=Fa ...[truncated 2915 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/text_to_speech.py:41
Finding

Configurable TTS Host Can Receive the Speech API Key and Private User Text

Content
View full analysis
dict: """构建请求头。使用新版控制台 X-Api-Key 鉴权。""" headers = { "Content-Type": "application/json", "X-Api-Resource-Id": TTS_RESOURCE_ID, "X-Api-Request-Id": str(uuid.uuid4()), } api_key = get_speech_api_key().strip() if not api_key: raise PermissionError( "MODEL_SPEECH_API_KEY 需在环境变量中配置。" "见 https://console.volcengine.com/speech/new/setting/apikeys" ) headers["X-Api-Key"] = api_key return headers ``` The request sends those headers together with a body containing the complete user-provided text: ```python with httpx.Client(timeout=timeout) as client: with client.stream("POST", TTS_ENDPOINT, headers=headers, json=body) as resp: resp.raise_for_status() ``` The body is constructed with the input text: ```python return { "user": {"uid": "skill_tts_user"}, "req_params": { "text": text, "speaker": speaker, "sample_rate": sample_rate, "audio_params": audio_params, "additions": json.dumps(additions_dict), }, } ``` ### Technical Analysis Sending the speech API key and text to the legitimate TTS provider is necessary for the declared functionality. The security flaw is that `MODEL_SPEECH_API_BASE` can replace the destination with any host, while `_build_headers()` still attaches the real `X-Api-Key` and the request body still contains the complete t ...[truncated 1834 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a serious description-to-behavior mismatch: the skill claims to do text-to-speech, but the detected behavior includes API key management, reading and writing .env files, and caching sensitive credentials, while lacking any actual TTS implementation. A skill that covertly provisions or persists secrets under the guise of audio generation can exfiltrate, expand access, or create long-lived unauthorized credentials.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/api_key.py (reported line 64)May include surrounding context.

python
def _dotenv_path() -> str:
    return os.path.join(os.path.dirname(os.path.abspath(__file__)), ".env")


def _load_dotenv_if_available(dotenv_path: str) -> None:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
76% confidence
Finding

The skill advertises capabilities that require environment access, network access, and shell execution, but it does not declare any explicit tool scope or permission boundaries. This increases the chance that the runtime grants broader access than users or reviewers expect, making misuse of credentials, network calls, or file operations harder to detect and control.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation text is broad enough to trigger on ordinary requests to read or narrate text, which can cause the skill to run in situations where the user did not intend audio generation or external API use. In the context of a skill with network and credential handling, overbroad invocation increases exposure by causing unnecessary execution and possible transmission of user-provided content to third-party services.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The usage guidance says to prioritize this skill whenever a task 'essentially' involves converting text to playable audio, without clear limits or confirmation requirements. That ambiguity can cause unintended invocation, especially for sensitive text, leading to unnecessary external processing, file creation, and credential use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide instructs users to place a live API key into a workspace-local .env file but does not warn about protecting the file, excluding it from version control, or avoiding sharing it in logs and screenshots. In a skill repository context, this increases the chance of accidental credential leakage through commits, backups, or collaborative workspace sharing, which could enable unauthorized API use and billing abuse.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This TTS skill goes beyond synthesis and contains logic to enumerate or create API keys, then cache them for future use. Expanding a narrowly scoped skill into credential provisioning increases attack surface and violates least privilege, especially because the code can silently obtain reusable secrets from another bearer token.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code performs credential management unrelated to the stated text-to-speech function: it sends authenticated requests to list existing API keys, creates a new key if none exists, and stores the result locally. In a skill context, this is dangerous because a content-generation tool should not silently mint or manage long-lived credentials behind the scenes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Persisting the obtained API key into a local .env file creates a recoverable plaintext secret on disk, which may be exposed through backups, logs, repository mistakes, shared workspaces, or other local compromise. The chmod(0600) helps but does not eliminate the risk of unnecessary secret duplication and persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. The file presents all instructions in Chinese only, which may force a specific language on users without opt-in or justification in the document.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified as httpx>=0.25.0, which allows installation of any future version and does not ensure reproducible builds. This can unintentionally introduce vulnerable or breaking releases through dependency drift or supply-chain changes, even though the manifest itself is not directly malicious.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
# Byted-Text-to-Speech skill dependencies
# Ref: https://www.volcengine.com/docs/6561/1598757
httpx>=0.25.0

Unverifiable Dependency: httpx has 2 known advisory(ies) (CVE-2021-41945 (Improper Input Validation in httpx); CVE-2021-41945 (Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in `http)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding

Because the manifest does not pin the httpx version, it is not possible to verify whether the resolved package version is affected by known advisories. In a network-facing TTS skill that likely makes outbound API calls, uncertainty around HTTP client security increases supply-chain and request-handling risk, though the actual impact depends on the installed version.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The code performs POST requests to external endpoints using a bearer token and sends payload data such as ProjectName and Name. There is no visible warning, logging, or explanatory comment/docstring informing users that the function will contact a remote service and transmit this information.

Content

No source excerpt is available for this finding.