ast-refactoring-scripts
Warn
Audited by Gen Agent Trust Hub on Oct 23, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill's primary operational directive instructs the agent to generate and execute custom Python (
libcst) and TypeScript (ts-morph) scripts at runtime to perform bulk file modifications. This pattern of generating source code and executing it via subprocess is a dynamic execution risk. - [COMMAND_EXECUTION]: The instructions mandate the use of
run_commandor CLI execution (e.g.,python scratch/refactor.py) to run the generated transformation scripts. This bypasses typical step-by-step file editing review loops in favor of autonomous bulk modification. - [INDIRECT_PROMPT_INJECTION]: The skill operates as a processing surface for untrusted data (the repository's source code) while possessing powerful capabilities.
- Ingestion points: The scripts ingest all files in the
src/directory using glob patterns (Path(root_dir).rglob("*.py"),project.getSourceFiles("src/**/*.ts*")). - Boundary markers: No boundary markers or "ignore embedded instructions" warnings are used when the agent reads or the scripts process the files.
- Capability inventory: The agent has
run_commandcapabilities, and the generated scripts have full filesystem write access to the repository. - Sanitization: No sanitization or verification of the source files is performed before they are parsed and transformed by the AST tools.
Audit Metadata