grpo-rl-training
Fail
Audited by Gen Agent Trust Hub on Sep 17, 2026
Risk Level: HIGHDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The file
examples/reward_functions_library.pycontains arun_test_casesfunction that utilizes theexec()built-in to execute code blocks extracted from model-generated completions. This allows for the execution of arbitrary Python code within the host environment. While the code includes a comment warning that sandboxing should be used in production, the provided implementation lacks any safety boundaries. - [INDIRECT_PROMPT_INJECTION]: The skill is architected to ingest external data and use it to prompt a model whose output is then executed, creating a significant vulnerability surface.
- Ingestion points: Untrusted data enters the agent context through the
get_datasetfunction intemplates/basic_grpo_training.py(which fetches the GSM8K dataset from OpenAI's Hugging Face repository) and custom loaders inSKILL.md. - Boundary markers: The instructions recommend using XML-like tags (e.g.,
<reasoning>,<answer>) to delimit model output, but these do not prevent the model from generating malicious code within those tags. - Capability inventory: The skill provides the
exec()capability through thecode_execution_rewardimplementation inexamples/reward_functions_library.py. - Sanitization: There is no sanitization, filtering, or restricted environment (sandbox) applied to the code extracted from model completions before execution.
Recommendations
- AI detected serious security threats
Audit Metadata