T09 · Insecure Skill Coding Practices
- Location
SKILL.md:36- Finding
Hard-Coded Telegram Bot Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a legitimate voice-reply purpose, but it hard-codes a Telegram bot token and recipient and can automatically forward AI replies to that fixed chat.
Do not install this as-is unless you fully control the embedded Telegram bot and Chat ID and understand that enabled replies may be converted to audio and sent there. Before use, remove the hard-coded token and recipient, rotate the exposed token, require per-chat configuration and confirmation, avoid shell-string interpolation for TTS text, and pin dependencies in a controlled environment.
SKILL.md:36Hard-Coded Telegram Bot Credential
SKILL.md:72Fixed Telegram Recipient Can Cause Unauthorized Disclosure of Reply Content
SKILL.md:53PowerShell Command Injection Through TTS Reply Text
SKILL.md:115Unpinned Runtime Installation of Third-Party TTS Dependency
The skill instructs the model to automatically convert and retransmit its prior reply content as audio, which can include sensitive data derived from user inputs or system context. Because this occurs automatically once enabled, it creates a persistent exfiltration channel in natural-language form to an external service.
The skill hard-codes a Bot Token, Chat ID, and automatic voice-sending workflow to a fixed Telegram target, creating a direct data-disclosure mechanism to a specific external account. In skill context, this is more dangerous because the destination is predetermined and opaque to the user, strongly suggesting intentional exfiltration rather than normal user-directed messaging.
The skill performs file writes, may install software, and sends outbound Telegram messages, yet it does not require clear user-facing disclosure or confirmation about these side effects. Hidden state changes and outbound communications can surprise users and lead to unintended disclosure or system modification.
The skill instructs the agent to install a package via shell command at runtime without explicit user approval, provenance checks, or environment constraints. Allowing a skill to trigger package installation expands the attack surface, can modify the host system unexpectedly, and normalizes execution of network-fetching commands from untrusted skill content.
The daemon automatically monitors bot messages and forwards their content into a TTS pipeline and back to Telegram without any per-message consent, warning, or data classification check. In this context, messages may contain secrets, personal data, or sensitive operational output, so the automation creates an avoidable privacy and data-handling risk.
The code hard-codes the voice locale to "zh-CN-XiaoyiNeural", and the surrounding natural-language description is entirely Chinese with no indication that users can opt into a different language or locale. This creates a locale policy issue because the skill enforces a specific language setting rather than offering user choice or documenting a justified regional constraint.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def edge_tts(text, output_path):
try:
result = subprocess.run(
["edge-tts", "--voice", VOICE, "--text", text, "--write-media", str(output_path)],
capture_output=True, text=True, timeout=60
)
The skill hard-codes zh-CN-XiaoyiNeural as the required voice and presents it as a fixed parameter, which forces a specific language/locale behavior. There is no user opt-in, alternative locale selection, or documented reason that this skill must be Chinese-only.
The note says the voice content should be exactly the text that was just sent, with no extra content. However, the exception table later says text over 200 characters should be truncated before generating speech, which means the voice content would no longer match the just-sent text.
No suspicious patterns detected.