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.py performs 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_dir parameter 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_path parameter in scripts/generate_tests.py identifies 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
Risk Level
MEDIUM
Analyzed
Aug 3, 2026, 07:53 PM
Security Audit — agent-trust-hub — test-generator