generating-test-doubles
Warn
Audited by Gen Agent Trust Hub on Aug 21, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/generate_doubles.pycontains agenerate_scriptmethod that takes user-provided content (via the--contentargument) and writes it directly into a bash script file. - Evidence: In
scripts/generate_doubles.py, thegenerate_scriptmethod constructs a script withscript_content = f"#!/bin/bash\n...\n{template}\n..."wheretemplateis theargs.contentvalue. - [REMOTE_CODE_EXECUTION]: The
generate_scriptmethod inscripts/generate_doubles.pyexplicitly changes the file permissions to make the generated script executable (file_path.chmod(0o755)), creating a vector for immediate execution of arbitrary commands if an agent or user runs the resulting file. - Evidence:
file_path.chmod(0o755)inscripts/generate_doubles.pyfollowing the write operation. - [DYNAMIC_EXECUTION]: The skill facilitates the creation of executable files from text strings at runtime, which is a high-risk pattern for supply chain or injection attacks if the input content is not sanitized.
- Evidence: The
--type scriptoption in the CLI interface ofscripts/generate_doubles.pymaps directly to the creation of executable shell files.
Audit Metadata