generate-python-runnability-test

Pass

Audited by Gen Agent Trust Hub on Oct 17, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • Command Execution: The skill uses subprocess.run to invoke the ruff formatting utility on generated source code. This is implemented using a static list of arguments, ensuring the command is localized to the formatting task and preventing shell injection.
  • File System Operations: The tool writes Python test files (test_runnability.py) and configuration files (conftest.py) to the targeted recipe's tests/ directory. It includes safety mechanisms such as requiring an explicit --overwrite flag to clobber existing files and a dry-run mode to prevent unintended changes.
  • Indirect Prompt Injection Surface: The skill processes user-provided Python code and pyproject.toml files to determine necessary test configurations.
  • Ingestion points: .py files and pyproject.toml files within the user-specified recipe directory.
  • Boundary markers: The skill instructions mandate a dry-run first and require the agent to present a preview of the generated code to the user before writing to disk.
  • Capability inventory: File writing (Path.write_text) and subprocess execution (ruff formatter).
  • Sanitization: The script uses the ast (Abstract Syntax Tree) module for structured parsing of Python files, which is more resilient than raw text processing for identifying code patterns.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 17, 2026, 06:18 PM