T08 · Insecure Dependencies
- Location
scripts/start_question_service.ps1:32- Finding
Automatic Installation of Unreviewed Runtime and Project Dependencies
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed QuizAI question-bank helper, but its service scripts can install software and force-stop unrelated local processes without enough safeguards.
Install only if you intend to use it inside the QuizAI project and are comfortable with local file processing, database writes, and a local FastAPI service. Review or modify the start and stop PowerShell scripts before using them: prepare Python/dependencies yourself, avoid automatic winget or pip installs during startup, and ensure the stop script only terminates the intended QuizAI process.
scripts/start_question_service.ps1:32Automatic Installation of Unreviewed Runtime and Project Dependencies
scripts/stop_question_service.ps1:24Shutdown Script Can Forcefully Terminate Unrelated Processes
声明描述的是一个较完整的题库处理与服务控制技能,但提供的代码片段实际只是“资料文本抽取”工具,用于把上传文件转成纯文本供后续模型阅读。它没有任何生成题目、规范题库、输出 Excel、调用模型、或管理 Python 服务的逻辑。虽然“从上传资料出题”流程中,文本提取可以算支持性步骤,但该片段的主要功能与声明的主要用途存在明显差异,因此应判定为不匹配。
声明描述涵盖三类能力:1) 从上传资料生成题库 Excel,2) 规范/格式化题库,3) 启动/停止 Python 刷题服务。该代码块的实际职责较窄:它要么把已有 JSON 题库交给另一个脚本导出为 Excel,要么先提取资料文本,然后提示用户去按指南用对话模型生成 JSON,再手动执行导出命令。因此,代码并未直接完成“模型出题生成题库”的核心过程,只是为该流程做前置提取和后置导出。更明显的是,声明中的启动/停止服务能力在此代码中完全不存在。基于给定代码块,声明相对实际行为明显过宽,属于描述与行为不一致。
声明的核心功能是生成/规范题库以及启动或停止服务;但提供的代码仅执行本地文件题库导入。它支持 JSON 和 Excel 文件输入,必要时对 JSON 题目调用 prepare_export_questions 做整理/打乱选项,然后初始化数据库并将题库存入 SQLite。代码中没有对话式模型交互、没有从上传资料生成新题目、没有导出或规范 Excel 文件、也没有任何启动/停止 Python 服务的逻辑。因此其实际主要用途与声明描述存在实质性偏差。
The skill instructs the agent to read files, write generated JSON/XLSX outputs, and execute shell/PowerShell commands, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: an agent or host may permit broader file-system or shell access than users expect, increasing the risk of unintended command execution or modification of local project data.
The activation description is broad and includes generic exam-related phrases, which can cause the skill to trigger for loosely related requests. Because the skill can read user-supplied files, write outputs, and run local scripts or services, over-broad invocation raises the chance of unintended execution in contexts where the user did not mean to authorize those actions.
The instruction that the agent should execute the corresponding chapter whenever the user mentions the listed functions is ambiguous and permissive. In this skill's context, ambiguity is more dangerous because execution paths include shell commands, local service control, and database writes, so a mistaken activation can have real side effects on the host environment.
The document title and all operational guidance are written as a mandatory Chinese-only generation guide, and nowhere offers the user a language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-o",
args.output,
]
return subprocess.call(cmd)
extract_script = SCRIPTS / "extract_material.py"
extract_out = Path(args.extract_out)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
extract_out = ROOT / extract_out
cmd = [sys.executable, str(extract_script), *args.inputs, "-o", str(extract_out)]
code = subprocess.call(cmd)
if code != 0:
return code
The script automatically performs a system-wide winget install of Python when python is not found, which goes beyond the minimal action of starting an application service. In an agent/skill context, this can cause unexpected host modification, trigger privileged package installation flows, and expand the blast radius if the skill is invoked in sensitive environments where users did not explicitly consent to software installation.
The manifest explicitly advertises capabilities to start and stop a local FastAPI service and even kill the QuizAI process, but it provides no user-facing warning, confirmation requirement, or scope limitation in the manifest metadata. In agent-driven environments, this can lead to unintended process control actions, service interruption, or changes to the local development environment when a user only loosely matches a trigger phrase.
The keyword "考试题目" is generic natural language that could appear in ordinary user requests about exams, not specifically this skill's workflow. In a manifest trigger list, such a broad phrase increases the chance of unintended invocation when the user is merely discussing exam questions rather than asking to run this skill.
The RuntimeError string is written only in Chinese, which imposes a specific language on users regardless of their locale or preferences. This is a natural-language policy concern because the file does not provide an alternative language or indicate that Chinese is a documented, region-specific requirement.
The module docstring is written only in Chinese, and the script's CLI description and status/error messages are also Chinese-only. This creates a locale/language policy concern because the skill imposes a specific language on users without any opt-in or documented region-specific justification.
The docstring, argparse descriptions, error messages, and success output are all hard-coded in Chinese throughout the script. This can violate a language/locale policy when a skill imposes a specific language on users without opt-in or justification.