T01 · Skill Instruction Hijacking
- Location
SKILL.md:9- Finding
Mandatory Global Agent Behavior and Instruction Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a voice-announcement tool, but it asks to make announcements mandatory across all agent sessions, persist those rules in workspace identity and memory files, and send announcement text to a remote TTS backend without clear opt-in.
Install only if you explicitly want always-on agent voice announcements and are comfortable editing persistent workspace behavior files. Before use, remove or decline the mandatory global rules and session hooks, avoid announcing prompt or response content, and assume text sent to speech synthesis may leave the local machine through edge-tts.
SKILL.md:9Mandatory Global Agent Behavior and Instruction Hijacking
SKILL.md:136Persistent Memory Poisoning and Automatic Session Hook Installation
audio_announcement/announce_helper.py:249User-Derived Announcement Content Is Sent to a Remote TTS Service
requirements.txt:1Unpinned and Unhashed Runtime and Build Dependencies
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
The skill mandates spoken summaries for every interaction, including user instructions and reply content, which creates an unnecessary side channel for potentially sensitive information. In shared or public environments, local audio playback can disclose secrets, personal data, internal prompts, or task details to bystanders without user consent.
The instructions explicitly tell the agent to announce the content of user messages before acting, which can vocalize confidential prompts, credentials, private URLs, or sensitive operational details. Because the disclosure happens before task execution, there is little opportunity to sanitize the content first, increasing accidental leakage risk.
The markdown explicitly states '默认使用中文(zh)播报', which imposes a language choice by default. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is justified, which is not provided here.
The documented config value 'default_lang': 'zh' establishes Chinese as the default locale, and the surrounding text does not present this as an opt-in preference. This can conflict with language/locale policy because the skill appears to assume a specific language for all users.
The example code encourages directly embedding user-derived content in spoken announcements, normalizing unsafe patterns for downstream integrators. This increases the likelihood that developers will implement audio echoes of sensitive inputs, turning ordinary prompts into audible disclosures.
The configuration section again specifies 'default_lang': 'zh', reinforcing a mandatory-looking Chinese default across the skill documentation. Because no user choice or region-specific justification is supplied, this is a policy concern under the language/locale rule.
The description hardcodes bilingual announcement behavior as part of the skill's default identity rather than presenting it as an optional user preference. While not directly a code-execution issue, mandatory locale or speech behavior without consent can produce unwanted disclosures, accessibility problems, and unexpected output in environments where spoken language should be user-controlled.
The manifest explicitly directs integration into multiple persistent identity/memory files and describes 'every interaction must announce' style behavior plus an automatic startup check. That creates an always-on behavioral modification channel without clear user-scoped enablement, making it easy for the skill to continuously influence agent behavior, leak sensitive action summaries aloud, or persist beyond the user's intended context.
The configuration sets default_lang to "zh", which makes the skill default to Chinese output unless changed later. Under the stated policy, forcing a specific language without explicit user choice or documented justification is a natural-language policy concern.
The helper sends announcement text to edge-tts for remote speech generation, which can expose sensitive message contents to an external service without an explicit warning or consent at the point of use. In an agent skill context, announcement text may include task data, errors, or user-provided content, making accidental data leakage more likely.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
]
try:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return False
try:
result = subprocess.run(
player_cmd + [audio_file],
capture_output=True,
timeout=60
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 3. edge-tts 可用性(快速检查)
try:
result = subprocess.run(
[sys.executable, "-m", "edge_tts", "--help"],
capture_output=True,
timeout=5,
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
complete: "上传完成"
error: "网络连接失败"
详细规则见: skills/beep-skills/SKILL.md
"""
import os
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
logger.debug(f"尝试生成 ({attempt}/{MAX_RETRIES})...")
result = subprocess.run(
cmd,
capture_output=True,
text=True,
The announce function hard-codes the default language parameter to "zh", which forces a specific locale unless the caller explicitly overrides it. Under the policy, locale constraints should offer user choice or require clear opt-in; this file does not indicate such opt-in at the function boundary.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return False
try:
result = subprocess.run(
player_cmd + [audio_file],
capture_output=True,
timeout=60,
The script sets the default language to "zh" when the user does not provide a language argument. This imposes a specific locale by default rather than offering a neutral default or requiring explicit user choice, which is a natural-language policy concern.
The top-level docstring mixes English with Chinese ('小喇叭') as part of the skill description. Because this file provides no indication that multilingual output is optional or region-specific, it may conflict with a policy requiring language or locale choice rather than imposing a language implicitly.
The module docstring states the helper 'falls back to shell scripts', which suggests a script-based integration path. In the actual code, audio generation uses python -m edge_tts and fallback playback directly executes system player binaries via subprocess.run, with no shell script implementation present.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
# 全局配置
_config = AnnouncementConfig.load()
setup_logging(getattr(logging, _config.log_level))
# ============ 统计与监控 ============
class StatsCollector:
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
# 全局配置
_config = AnnouncementConfig.load()
setup_logging(getattr(logging, _config.log_level))
# ============ 统计与监控 ============
class StatsCollector:
The module docstring is written entirely in Chinese, which imposes a specific language for user-facing CLI documentation. Under the stated policy, locale or language should not be forced unless the tool clearly offers a choice or documents a justified regional constraint, which is not present here.
No suspicious patterns detected.