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.py contains a generate_script method that takes user-provided content (via the --content argument) and writes it directly into a bash script file.
  • Evidence: In scripts/generate_doubles.py, the generate_script method constructs a script with script_content = f"#!/bin/bash\n...\n{template}\n..." where template is the args.content value.
  • [REMOTE_CODE_EXECUTION]: The generate_script method in scripts/generate_doubles.py explicitly 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) in scripts/generate_doubles.py following 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 script option in the CLI interface of scripts/generate_doubles.py maps directly to the creation of executable shell files.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Aug 21, 2026, 06:18 PM
Security Audit — agent-trust-hub — generating-test-doubles