T07 · Tool Hijacking and Spoofing
- Location
transcriber.py:94- Finding
Execution of an Unverified External Transcription Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This meeting transcription skill is mostly coherent, but it runs its core transcription code from an unaudited fixed local path and makes persistent setup changes, so it needs review before installation.
Install only if you trust and have reviewed the external D:/dev/python/voiceFunAsr/vocie_mic_fixed_gbk.py script and the local Conda environment. Treat meeting audio and transcripts as sensitive, get participant consent before recording, and avoid running the setup script until you understand the files it creates or modifies.
transcriber.py:94Execution of an Unverified External Transcription Script
transcriber.py:473Unpinned Third-Party Dependency Installation Instructions
Using shell=True for date /T && time /T is unnecessary and risky because it delegates execution to a shell interpreter. In a skill or automation context, unnecessary shell use is especially dangerous since such scripts may be run with user trust and broad filesystem access.
"python_path": python_path,
"env_path": env_info.get('audioProject_path'),
"conda_version": env_info.get('conda_version'),
"detected_at": subprocess.run(
'date /T && time /T',
shell=True,
capture_output=True,
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
bufsize=1,
universal_newlines=True,
cwd=r"D:\dev\python\voiceFunAsr",
env={**os.environ, "PYTHONUNBUFFERED": "1"}
)
print(f"转录进程已启动,PID: {process.pid}")
The skill advertises real-time microphone transcription and automatic file saving, but does not clearly warn users that spoken meeting content will be captured from the microphone and persisted to disk. This creates a privacy and consent risk, especially in meetings containing sensitive, personal, or confidential information, because users or bystanders may not realize recording/storage is occurring.
The natural-language description states the skill supports Chinese speech recognition, and the keywords reinforce a Chinese-only locale focus, but there is no indication that users can choose another language or that the restriction is a justified region-specific requirement. This can violate language/locale policy when a skill forces a specific language without opt-in.
The command triggers are short, natural-language phrases that can overlap with ordinary user requests, increasing the chance of accidental invocation or prompt confusion. In an agent setting, this can cause unintended execution of transcription-related actions, including opening files or starting/stopping processes, without clear user intent.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 获取版本
try:
result = subprocess.run(
[str(python_exe), "--version"],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
all_ok = True
for dep, description in deps:
try:
result = subprocess.run(
[python_exe, "-c", f"import {dep}; print('OK')"],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
all_ok = True
for dep, description in deps:
try:
result = subprocess.run(
[python_exe, "-c", f"import {dep}; print('OK')"],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print("\n[4] 检查音频设备...")
try:
result = subprocess.run(
[python_exe, "-c", """
import pyaudio
p = pyaudio.PyAudio()
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print("\n[4] 检查音频设备...")
try:
result = subprocess.run(
[python_exe, "-c", """
import pyaudio
p = pyaudio.PyAudio()
The user-facing instruction tells the user to say the fixed Chinese phrase '开始会议转录' in OpenClaw, which imposes a specific language for activation. The file does not provide an opt-in, alternative language, or explicit justification for this locale constraint.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
env_info['detected_by'] = 'CONDA_PREFIX'
# 方法2: 运行 conda info 命令
result = subprocess.run(
['conda', 'info', '--json'],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 测试 Python 版本
try:
result = subprocess.run(
[python_path, '--version'],
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
dependencies = ['pyaudio', 'webrtcvad', 'funasr', 'torch']
for dep in dependencies:
try:
result = subprocess.run(
[python_path, '-c', f'import {dep}; print(f"{dep} version: OK")'],
capture_output=True,
text=True,
This section writes configuration under the user's home directory and later updates skill assets without clearly warning the user beforehand about all filesystem changes. Silent writes to persistent config and project files are risky in a skill context because users may assume the script is only performing environment checks.
This code uses subprocess.run(..., shell=True) for a simple timestamp command, which invokes the system shell unnecessarily. Even though the string is currently constant, shell execution increases attack surface and can be abused via shell resolution behavior or future modifications that introduce variable input.
"python_path": python_path,
"env_path": env_info.get('audioProject_path'),
"conda_version": env_info.get('conda_version'),
"detected_at": subprocess.run(
'date /T && time /T',
shell=True,
capture_output=True,
The function claims to update skill metadata, but it also rewrites meeting_minutes.py and creates a new launcher batch file. Modifying executable skill files broadens behavior beyond what a user may expect from setup and can silently introduce persistence or execution changes in the skill.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
- scikit-learn
# 环境配置说明
# 1. 创建环境: conda create -n audioProject python=3.8
# 2. 激活环境: conda activate audioProject
# 3. 安装依赖: pip install -r requirements.txt
# 4. 验证安装: python -c "import funasr; print('FunASR OK')"
The instruction tells the user to invoke the skill using a Chinese phrase, with no indication that other languages are supported or that the language choice is optional. This is a natural-language locale constraint presented without opt-in, which can violate language-choice policy expectations.
This Python file contains all docstrings and interactive prompts in Chinese, including the title and menu shown to the user. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print()
cmd = ["cmd", "/c", "start", "cmd", "/k", str(batch_file)]
subprocess.Popen(cmd)
print("转录系统已在新窗口中启动")
print("请在新窗口中查看实时转录输出")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print()
cmd = ["cmd", "/c", "start", "cmd", "/k", str(batch_file)]
subprocess.Popen(cmd)
print("转录系统已在新窗口中启动")
print("请在新窗口中查看实时转录输出")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"""运行命令并处理输出"""
try:
if capture_output:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return result
else:
# 实时输出模式
process = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return result
else:
# 实时输出模式
process = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,