hugging-face-model-trainer
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: HIGHEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [External Downloads / Remote Code Execution] (HIGH): The skill contains templates and instructions that direct the agent to download and execute code from remote repositories.
- In
references/training_patterns.md, the skill suggests executing a remote script fromhttps://raw.githubusercontent.com/huggingface/trl/main/examples/scripts/grpo.py. While the 'huggingface' organization is trusted, direct remote execution is a significant risk vector. - In
references/gguf_conversion.md, the skill recommends cloninghttps://github.com/ggerganov/llama.cpp.gitfor runtime compilation. The user 'ggerganov' is not in the [TRUST-SCOPE-RULE] list of trusted organizations, classifying this as an unverifiable external dependency. - [Command Execution / Privilege Escalation] (HIGH): The documentation (e.g.,
references/gguf_conversion.md) provides code snippets usingsubprocess.runto perform administrative tasks likeapt-get updateandapt-get install. While standard for setting up ephemeral training environments, this capability allows for arbitrary command execution and privilege escalation within the runner context. - [Indirect Prompt Injection] (HIGH): The skill's primary purpose involves ingesting untrusted external data (datasets) and performing operations with side effects (pushing to the Hub).
- Ingestion points: Multiple scripts (e.g.,
scripts/train_sft_example.py,scripts/train_dpo_example.py) useload_datasetto pull content from the Hugging Face Hub. - Capability inventory: The training environment utilizes the
HF_TOKENsecret and has thepush_to_hubcapability to modify or create repositories. - Sanitization: No explicit boundary markers or sanitization logic is present to prevent malicious data within datasets from influencing the agent's logic or model training outputs.
- Evidence Chain: Untrusted Hub data enters the context via
datasets(File:scripts/train_sft_example.py), lacks boundary markers, and possesses the capability to execute code via training processes and write to the Hub viapush_to_hub. - [Dynamic Execution] (MEDIUM): The GGUF conversion process described in
references/gguf_conversion.mdinvolves runtime compilation of C++ source code viacmake. Running binaries compiled at runtime from external sources significantly expands the attack surface.
Recommendations
- AI detected serious security threats
Audit Metadata