T07 · Tool Hijacking and Spoofing
- Location
transcriber.py:100- 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 purpose-aligned, but it runs core transcription code from an unreviewed external local path and has broad setup and stop-process behavior that warrants manual review.
Install only if you trust and can inspect the external D:/dev/python/voiceFunAsr/vocie_mic_fixed_gbk.py script and the local Conda environment it runs in. Obtain participant consent before recording meetings, pin and review dependencies before setup, and be aware that the stop command may terminate unrelated processes whose command line matches the transcription-script substring.
transcriber.py:100Execution of an Unverified External Transcription Script
transcriber.py:473Unpinned Third-Party Dependency Installation Guidance
transcriber.py:220Overbroad Termination of Processes Based on a Command-Line Substring
Using subprocess.run with shell=True is a genuine dangerous pattern because it expands execution through the shell, increasing exposure to command injection and environment manipulation. In this setup script, which already performs file writes and skill modifications, retaining shell-based execution makes the overall skill behavior less trustworthy and easier to extend unsafely.
"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,
This code programmatically patches the main skill script by injecting new method text without a dedicated confirmation step or integrity check. Self-modifying code in a skill is high risk because it can alter future execution paths, hide persistence, and make later behavior differ from the originally reviewed codebase.
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 instructs users to start live meeting transcription and stop/save it, but it does not clearly warn that this action captures microphone audio in real time and persists potentially sensitive meeting content to disk. In a meeting context, this can expose private conversations, regulated data, or confidential business information if users trigger it without informed consent or awareness of local recording and retention behavior.
The manifest describes the skill as supporting Chinese speech recognition and all exposed command labels are in Chinese, which creates a language-specific user experience. There is no indication that users may opt into another language or that the restriction is explicitly justified as a region-specific or compliance-bound tool.
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 invoke the skill with a fixed Chinese phrase, '开始会议转录', without offering an alternative language or indicating that the Chinese-only trigger is optional. This is a natural-language locale constraint embedded in the skill behavior and can violate language-choice policy when no opt-in or justification is provided.
The file's user-facing description and output strings are written entirely in Chinese and present the skill as intended for that locale, but there is no indication that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
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 subprocess call uses shell=True with a string command, which introduces unnecessary shell invocation and creates a command-execution sink. Even though the current string is constant, shell usage increases risk and normalizes a dangerous pattern; in skill/setup contexts that modify files and run local tooling, such patterns are more concerning because future edits may interpolate variable data into the shell command.
"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 docstring at L218 describes a narrow purpose: updating the skill for Conda support. In practice, the function modifies SKILL.md (L222-L245), creates a new batch launcher file (L247-L285), and later edits the main skill script itself (L287-L339). This is more than a minor implementation detail and contradicts the limited description of the function's effects.
The script rewrites skill metadata and creates local startup/config artifacts without a specific prior warning or granular consent for each file modification. In an agent skill context, silent self-modification reduces auditability and can be abused to persist behavior changes that a user did not clearly approve.
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')"
This Python file contains all user-facing strings in Chinese, including the title, instructions, and input prompt, which effectively requires Chinese comprehension to use the skill. The file does not offer an alternate language or explain that the skill is intentionally limited to a Chinese-speaking or region-specific environment.
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.
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,