hugging-face-model-trainer

Pass

Audited by Gen Agent Trust Hub on Sep 10, 2026

Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTIONPRIVILEGE_ESCALATION
Full Analysis
  • [COMMAND_EXECUTION]: The convert_to_gguf.py script uses subprocess.run to execute commands for cloning repositories, installing packages with pip, and configuring builds with cmake. The script implements defensive regex validation via require_hf_repo_id and safe_filename_component to verify that Hugging Face repository IDs and local path components are properly formatted before use, which helps mitigate command injection risks.
  • [DYNAMIC_EXECUTION]: The model conversion process involves the runtime compilation of the llama.cpp C++ library using cmake. The skill builds the llama-quantize binary at runtime and subsequently executes it to generate model files in different quantization formats.
  • [EXTERNAL_DOWNLOADS]: The skill fetches the llama.cpp source code from GitHub and references a dataset inspection script hosted on Hugging Face. These downloads target well-known and reputable services standard to the machine learning ecosystem.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes external datasets from the Hugging Face Hub, creating a potential surface for indirect prompt injection.
  • Ingestion points: Data is ingested via load_dataset in training templates such as scripts/train_sft_example.py and scripts/unsloth_sft_example.py.
  • Boundary markers: The scripts do not explicitly use boundary markers or specific instructions to ignore embedded prompts within the dataset text.
  • Capability inventory: The skill can execute cloud-based jobs via the hf_jobs tool and perform local file writes and binary execution during the GGUF conversion process.
  • Sanitization: While repository names are validated, the raw content of the ingested datasets is not sanitized for malicious natural language instructions.
  • [PRIVILEGE_ESCALATION]: The skill documentation and scripts include commands to install system-level packages using apt-get. While these operations typically require elevated privileges, they are intended for the configuration of the Hugging Face Jobs ephemeral Docker environment rather than the local host.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 10, 2026, 12:50 AM
Security Audit — agent-trust-hub — hugging-face-model-trainer