test-generator
Warn
Audited by Gen Agent Trust Hub on Aug 3, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/generate_tests.pyperforms dynamic code generation by programmatically assembling Python source code strings based on the structural analysis of an input file. This generated content is then written to a new file for execution. Generating executable scripts from variable data, even when used for development automation, constitutes an inherent security risk. - [PRIVILEGE_ESCALATION]: The tool accepts an
output_dirparameter which is used directly in directory creation (os.makedirs) and file path construction (os.path.join) without any validation or sanitization. This creates a path traversal vulnerability, potentially allowing a malicious actor or an unintended agent action to write files to sensitive or unauthorized directories on the host system. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted local Python source code to generate its output, establishing a surface for indirect prompt injection attacks.
- Ingestion points: The
file_pathparameter inscripts/generate_tests.pyidentifies a local file whose contents are read and parsed by the tool. - Boundary markers: The script does not utilize delimiters or specific warnings to distinguish between its own logic and the data ingested from the source file.
- Capability inventory: The script possesses filesystem capabilities, specifically the ability to create directories and write new files.
- Sanitization: There is no validation or sanitization of the class and function names extracted from the source file, which are directly interpolated into the resulting executable test code.
Audit Metadata