azure-ai-fine-tuning
Warn
Audited by Gen Agent Trust Hub on Jun 22, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses
subprocess.run()in multiple orchestrator scripts to interact with the Azure CLI (az) and to chain execution of other Python scripts. - Evidence in
scripts/auto_finetune.py,scripts/deploy_model.py, andscripts/chunk_and_generate.pyshows the construction of command lines to fetch AAD tokens, deploy models via ARM, and launch data generation jobs. - In
scripts/chunk_and_generate.py, arguments like--teacherand--recipeare passed directly into subprocess calls, which could be exploited if configuration artifacts are modified by an attacker. - [DYNAMIC_EXECUTION]: The script
scripts/calibrate_grader.pyutilizesexec()andcompile()to load and execute Python code from a file provided by the user or the agent. - While the script includes a path validation check to ensure the grader file is within the current working directory, this mechanism allows for arbitrary code execution within the context of the agent's environment.
- This is a core feature for Reinforcement Fine-Tuning (RFT) where custom grading logic is required, but it presents a risk if the agent is directed to execute a malicious grader file.
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to process untrusted external data (CSV, JSON, JSONL) for fine-tuning and evaluation, using LLM judges to score the outputs.
- Ingestion points: Data enters the context via
scripts/auto_finetune.py,scripts/evaluate_model.py, andscripts/quality_filter.pywhen loading datasets. - Boundary markers: Missing; prompt templates for the LLM judges (e.g., in
scripts/evaluate_model.py) use simple string interpolation of model outputs without explicit delimiters or instructions to ignore embedded commands. - Capability inventory: The skill has significant capabilities including file writing, network operations to Azure endpoints, and shell command execution.
- Sanitization: There is minimal sanitization of the content from the processed datasets before it is sent to the evaluation models.
- [EXTERNAL_DOWNLOADS]: Several scripts and documentation files reference external resources and APIs, all of which are hosted on official Microsoft and Azure domains.
scripts/deploy_model.pyinteracts withmanagement.azure.comfor ARM deployments.scripts/content_safety_check.pysends text to the Azure Content Safety API.
Audit Metadata