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.pycontains a functionrun_test_casesthat uses the Pythonexec()built-in to execute code strings. This function is intended to evaluate model-generated responses during training to verify correctness. Runningexec()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 theexec()function can access sensitive environment variables, local filesystem data, and API tokens (such asWANDB_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
completionsargument incode_execution_reward(inexamples/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