T03 · Remote Payload Retrieval and Execution
- Location
scripts/distill_train.py:261- Finding
Arbitrary Code Execution Through Trusted Remote Model Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a plausible model-distillation workflow, but it asks agents to install software, download models, run training, and trust remote model code with weak approval and scoping controls.
Review this skill before installing. Use it only in an isolated virtual environment or container, pin dependencies and model revisions, disable trust_remote_code unless you have reviewed the model repository, and require explicit approval before downloads, package installs, teacher API calls, training, or generated script execution. Do not use sensitive or regulated datasets with remote teacher APIs unless you have confirmed provider privacy and retention terms.
scripts/distill_train.py:261Arbitrary Code Execution Through Trusted Remote Model Code
scripts/setup_env.sh:40Automatic Installation of Unpinned Python and System Dependencies
scripts/package_deployment.py:94Shell Command Injection in Generated GGUF Conversion Script
The README instructs users to generate CoT data using a remote teacher model (gpt-4) without warning that prompts and possibly sensitive source data will be transmitted to an external API provider. In a distillation workflow, training inputs may contain proprietary, regulated, or confidential material, so silent exfiltration to a third party creates a meaningful confidentiality and compliance risk.
声明描述的是一个完整的模型蒸馏与压缩系统,核心能力应包括教师模型与学生模型之间的训练/迁移、蒸馏策略、训练过程控制以及评估。实际代码只是一个 baseline_test.py:加载单个模型,生成几个固定测试用例的回答,检查关键词,计算 token 生成速度,并将结果写入报告。这属于基础能力评测/基线测试,最多可作为蒸馏前后的辅助评估环节,但并不能代表“模型蒸馏大师”的主要功能。代码没有训练、蒸馏、比较教师与学生、处理课程学习或对抗训练等行为,因此描述与实际行为存在明显不匹配。
总体上,代码的主目的与“模型蒸馏训练”这一大方向是匹配的,且确实实现了自适应蒸馏这一核心能力,因此不是完全无关的描述。但声明明显夸大了能力范围:代码没有课程学习、能力感知、对抗训练、多维度评估等完整工作流实现,更多是一个自适应KD + LoRA/QLoRA 的训练脚本。另外,默认学生模型的声明也与代码不一致,代码实际不固定学生模型,而是从配置读取,并在文件头中特别说明针对 gemma-4-E4B-it 优化。因此应判定为描述与实际行为存在实质性不匹配。
声明描述的是一个高层次、功能完整的模型蒸馏工具,但提供的代码片段只是一个模型下载器。其主要目的与声明严重不符:代码只访问外部模型仓库下载预训练模型,没有任何训练数据处理、教师-学生框架、损失函数设计、蒸馏策略、评估流程或对抗训练实现。此外,声明中的默认学生模型与代码实际下载的模型名称也不一致。因此这是明显的描述与行为不匹配。
声明描述的是一个完整的模型蒸馏工作流工具,核心应包含训练/蒸馏逻辑、教师学生模型处理、评估等能力。而提供的代码仅执行模型下载准备工作:创建目录、检测并尝试安装 git-lfs、克隆指定模型仓库、检查文件完整性。虽然下载默认学生模型可被视为蒸馏前的辅助步骤,但该代码片段的实际主功能与声明的核心能力明显不符,且完全缺少任何蒸馏、训练或评估实现,因此应判定为描述与行为不匹配。
声明描述的是一个“模型蒸馏大师”型技能,重点应在教师-学生迁移、训练策略和完整蒸馏工作流。给出的代码却只实现了评估环节,且评估方法相对简单:生成回答、做字符串匹配、统计tokens/s,并可对比基线模型与蒸馏后模型。虽然这与“蒸馏前后性能差异评估”相关,算是蒸馏工作流中的辅助部分,但远不足以支撑声明中的主要能力与完整流程。因此代码实际行为与声明用途存在明显不匹配。
声明描述的是一个范围很广的“模型蒸馏大师”工作流,应至少涉及教师/学生模型迁移、蒸馏训练或相关评估能力。但提供的代码片段只负责生成CoT(思维链)训练数据,属于蒸馏数据准备阶段的一个辅助脚本,而且实际教师模型调用都还是模板/模拟实现。该代码的主要用途与声明的完整蒸馏系统存在明显差异。虽然CoT数据生成可作为蒸馏流程的支持环节,但单独这段代码不足以支撑所宣称的核心能力,因此应判定为描述与行为不匹配。
声明描述的是一个覆盖蒸馏训练、策略与评估的完整系统,而提供的代码片段只做蒸馏后可能用到的一个辅助步骤:把LoRA权重合并到基础模型以便部署。虽然注释提到“蒸馏完成后”使用,但代码本身不执行蒸馏、不分析教师模型、不处理学生模型选择,也不包含训练、评估或课程/对抗等机制。因此代码的实际主要目的与声明的主要用途存在明显偏差,应判定为不匹配。
声明描述的是一个覆盖蒸馏建模全流程的能力型技能,重点在训练、分析和评估;而提供的代码块是独立的部署阶段脚本,主要做模型文件复制、生成 deployment_config.json、推理示例、requirements、README,并创建 zip/tar.gz 包,以及生成 GGUF/ONNX 转换脚本。虽然注释中称对象为“蒸馏模型”,但代码并不参与蒸馏本身,只处理已有模型的部署封装。这属于主要用途显著不同,并且存在未声明但明显的部署/转换能力,因此应判定为描述与行为不匹配。
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The README states that the workflow will automatically download a model, create project structure, and run baseline tests, but it does not clearly warn users about network access, significant disk consumption, or filesystem modifications. In an agent skill context, users may trigger these actions expecting advisory behavior, which can lead to unexpected resource use and side effects on the local machine.
The skill clearly instructs shell execution, file creation, package installation, and repository cloning, but declares no explicit tool/permission scope. This creates an ambient-authority problem where an agent may perform filesystem and shell actions without transparent user-approved boundaries, increasing the chance of unsafe execution or overreach.
The skill instructs the agent to immediately mutate the local environment by installing packages, enabling git-lfs, cloning a remote model repository, and creating directories before obtaining user confirmation. In a skill context, autonomous pre-confirmation execution is dangerous because it can unexpectedly alter the host, consume resources, and import untrusted external artifacts.
The skill directs immediate package installation, repository cloning, and filesystem modification without an explicit warning or consent gate. This is dangerous because executing setup commands can change the runtime, install unreviewed dependencies, consume storage/bandwidth, and increase supply-chain risk from remote packages or repositories.
The workflow tells the agent to call external teacher-model APIs and collect data without warning that prompts, datasets, or proprietary inputs may be transmitted to third-party services. In a distillation workflow, this context makes the risk more significant because training data often contains sensitive or licensed material that should not be sent externally by default.
Earlier description lines advertise a '完整工作流' supporting adaptive distillation, curriculum learning, capability awareness, adversarial training, and multidimensional evaluation. The component inventory names corresponding scripts such as generate_curriculum_data.py, generate_adversarial_samples.py, capability_aware_distill.py, and package_deployment.py, but this file only actually specifies generation of distill_train.py and evaluate.py, with no implementation details for the other claimed modules.
The component table says scripts/distill_train.py provides '动态温度/alpha调度' (dynamic temperature/alpha scheduling). In the actual script, temperature and alpha are read once from config and used as constants in loss computation, with no scheduling or adaptation logic, so the documentation overstates what the code does.
This plain-text sample file presents all instructional text and examples exclusively in Chinese, with no indication that the locale is optional or that the dataset is intentionally region-specific. Under the policy rule for natural-language violations, a forced language choice without user opt-in or justification is a reportable issue.
文件的名称、说明和触发词均以中文固定表述,未声明支持其他语言或允许用户选择语言/区域设置。根据语言/locale 政策,若技能对输出或交互语言施加固定约束而无用户 opt-in,属于自然语言策略问题。
The trigger phrases include broad terms such as “用 LangGraph 蒸馏” and “智能蒸馏流程”, which can match ambiguous user requests and cause the skill to activate outside the user’s intended scope. In a skill that can generate data, run training, and produce artifacts, accidental activation increases the chance of unintended resource consumption or workflow initiation.
The document describes synthesizing training data, executing training, saving checkpoints, and delivering a model, but it does not clearly warn users that these actions can write files, consume compute, and create durable artifacts. In practice, this can mislead users into invoking a workflow with side effects they did not fully consent to, especially when resumable execution and retries are built in.
The file’s natural-language descriptions and all user-facing prompts are written in Chinese, indicating the workflow is designed to operate in a single language. There is no visible opt-in, fallback, or documented locale constraint justifying why users must interact in Chinese.
The human_confirm node is documented as a human-in-the-loop approval gate, but it unconditionally sets user_approved=True and proceeds. This defeats an expected safety/control checkpoint, allowing the workflow to continue with data generation, training, and delivery even when a user should have had the opportunity to stop or modify execution.
Suspicious Unicode normalization or mixed-script content
The module docstring, function docstring, domain labels, and recommendations are all hard-coded in Chinese. This creates a language-policy concern because the skill imposes a specific language/locale on users without any opt-in mechanism or explanation that it is intentionally region-specific.
Detected: suspicious.dynamic_code_execution