ast-grep
Pass
Audited by Gen Agent Trust Hub on Jul 9, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/ast_grep_helper.pyscript executes theast-grep(orsg) binary usingsubprocess.run. The executable path is resolved dynamically at runtime by checking environment variables (OMO_AST_GREP_SG_PATH,CODEX_HOME), local bin directories, and the system PATH. - [EXTERNAL_DOWNLOADS]: The
install.shandinstall.ps1scripts download theast-grepbinary from its official GitHub releases page (github.com/ast-grep/ast-grep). The download source is the authoritative repository for the tool. - [PROMPT_INJECTION]: The skill presents an indirect prompt injection surface as it is designed to analyze and potentially modify arbitrary source code files from the user's project.
- Ingestion points: Local source code files processed by the
search,replace, andscansubcommands inscripts/ast_grep_helper.py. - Boundary markers: Absent; the tool performs structural parsing of the code directly.
- Capability inventory: The skill can read local files, perform AST-aware searching, and apply code modifications to the filesystem via the
ast-grepbinary. - Sanitization: The helper script includes a
validatefunction that checks search patterns for common syntax errors and regex misuses, though it does not sanitize the contents of the files being analyzed.
Audit Metadata