fine-tuning
Warn
Audited by Snyk on Feb 16, 2026
Risk Level: MEDIUM
Full Analysis
MEDIUM W011: Third-party content exposure detected (indirect prompt injection risk).
- Third-party content exposure detected (high risk: 0.90). The script's prepare_dataset function both opens user-supplied JSON files and calls datasets.load_dataset(data_path), which can fetch public Hugging Face or other user-provided datasets, meaning the agent ingests untrusted, user-generated third-party content as part of its workflow (potential for indirect prompt injection).
MEDIUM W012: Unverifiable external dependency detected (runtime URL that controls agent).
- Potentially malicious external URL detected (high risk: 0.80). The script calls AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf", trust_remote_code=True), which at runtime will fetch and execute model repo code from the Hugging Face model page (e.g. https://huggingface.co/meta-llama/Llama-2-7b-hf), creating a high-confidence remote-code-execution risk.
Audit Metadata