T09 · Insecure Skill Coding Practices
- Location
scripts/tts.py:18- Finding
Hard-Coded MiniMax API Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a plausible MiniMax text-to-speech tool, but it ships a hard-coded MiniMax API credential and gives broad outbound messaging instructions without enough user control or disclosure.
Review carefully before installing. Do not use this package as published unless the embedded MiniMax API key is removed and rotated, credentials are supplied by each user through a protected secret source, and the skill clearly warns before sending text or generated audio to MiniMax or messaging platforms.
scripts/tts.py:18Hard-Coded MiniMax API Credential
The documented behavior does not match the implemented behavior, and the mismatch includes a reported hardcoded credential/API key. Hidden sensitive behavior and undocumented credentials are dangerous because they can leak secrets, mislead reviewers about what the skill actually does, and enable unauthorized API use or account compromise.
The skill documentation exposes capabilities involving shell execution and outbound network access, but it declares no tool scope or permission boundaries. In an agent environment, this weakens least-privilege controls and can allow the skill to invoke commands or external APIs without explicit review, increasing the blast radius if the skill is misused or later modified.
The skill instructs users how to send generated audio to external messaging channels but does not warn about outbound transmission, recipient targeting risks, or privacy implications. This is dangerous because synthesized content may contain sensitive user text, and sending it externally can cause unintended disclosure or abuse, especially in an automation context.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
data = {"voice_type": "all"}
try:
resp = requests.post(url, headers=headers, json=data, timeout=30)
resp.raise_for_status()
result = resp.json()
The function sends user-provided text directly to a third-party TTS service, which can disclose sensitive or private content to an external provider. In a skill context, users may assume text is processed locally unless the network transmission is clearly disclosed, making this a real privacy and data-handling issue.
This POST transmits arbitrary user text to a remote service for synthesis, which can expose confidential prompts, personal data, or proprietary material to a third party. The skill context increases the risk because text-to-speech content is often natural-language user input that may contain sensitive information, and the script gives no meaningful disclosure or consent mechanism.
try:
print(f"正在生成语音...", file=sys.stderr)
resp = requests.post(url, headers=headers, json=data, timeout=60)
resp.raise_for_status()
result = resp.json()
The description explicitly positions the skill for generating Chinese speech, which is a locale/language constraint expressed in natural language. The file does not indicate user opt-in for this language restriction or explain that the skill is intentionally region- or language-specific.
The docstring, help text, status messages, and examples are presented only in Chinese. Per the policy, forcing a specific language without offering a user choice can be a natural-language policy issue unless the locale restriction is explicitly documented and justified.
This function saves audio output to disk, either at a default path or a user-specified path. While it reports the save location afterward, there is no upfront disclosure that the tool performs file writes, which is relevant safety information for command-line skills.