grpo-rl-training

Fail

Audited by Gen Agent Trust Hub on Apr 7, 2026

Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The file examples/reward_functions_library.py contains a function run_test_cases that uses the Python exec() built-in to execute code strings. This function is intended to evaluate model-generated responses during training to verify correctness. Running exec() on untrusted model completions is a dangerous pattern that allows the model to execute arbitrary code with the same privileges as the training process.- [REMOTE_CODE_EXECUTION]: The skill architecture creates a Remote Code Execution (RCE) surface where an attacker, through indirect prompt injection or model manipulation, can cause the execution of malicious Python code on the host machine. Although the author included a warning about sandboxing, the example code provided is immediately exploitable if used as written.- [DATA_EXFILTRATION]: Malicious code executed via the exec() function can access sensitive environment variables, local filesystem data, and API tokens (such as WANDB_API_KEY) and exfiltrate them via network requests to attacker-controlled domains.- [PROMPT_INJECTION]: The skill is highly vulnerable to Indirect Prompt Injection (Category 8):
  • Ingestion points: Untrusted completions from the language model enter the system via the completions argument in code_execution_reward (in examples/reward_functions_library.py).
  • Boundary markers: The implementation relies on basic regex (markdown code blocks) to extract code, which is insufficient to prevent the model from injecting malicious payloads that escape the intended context.
  • Capability inventory: The training process has full access to the operating system's command execution capabilities through exec() and network access for training telemetry and dataset management.
  • Sanitization: No input validation, sanitization, or secure sandboxing is present in the provided skill code.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Apr 7, 2026, 11:11 AM