grpo-rl-training
Fail
Audited by Gen Agent Trust Hub on Oct 2, 2026
Risk Level: HIGHDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [DYNAMIC_EXECUTION]: The file
examples/reward_functions_library.pycontains arun_test_casesfunction that uses the built-inexec()function to execute Python code extracted from model generations. - Evidence:
exec(code, exec_globals)call withinexamples/reward_functions_library.py. - Context: This function is intended to verify the correctness of code produced by a model during training. Although the code includes a developer warning regarding the necessity of sandboxing, the template as provided executes arbitrary strings on the host system, which could be exploited to run malicious code if the model output is manipulated.
- [INDIRECT_PROMPT_INJECTION]: The skill architecture creates a significant attack surface for indirect prompt injection by processing untrusted model completions through powerful execution tools.
- Ingestion points: The
completionsparameter in all reward functions, specificallycode_execution_rewardinexamples/reward_functions_library.py. - Boundary markers: There are no implementation-level delimiters or validation steps to ensure that the code being executed does not contain malicious system-level instructions.
- Capability inventory: The
run_test_casesfunction (called bycode_execution_reward) provides full arbitrary code execution capabilities viaexec(). - Sanitization: No code-level sanitization or sandboxing (like Docker or gVisor) is implemented in the template; it relies solely on a documentation warning.
Recommendations
- AI detected serious security threats
Audit Metadata