ast-grep
Pass
Audited by Gen Agent Trust Hub on Sep 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script 'scripts/ast_grep_helper.py' executes the 'ast-grep' (sg) binary using 'subprocess.run' with list-based arguments, preventing shell injection vulnerabilities. This is the core functionality of the skill.
- [EXTERNAL_DOWNLOADS]: The 'install.sh' and 'install.ps1' scripts are designed to download the 'ast-grep' binary from its official GitHub release page ('github.com/ast-grep/ast-grep'). These downloads target a well-known and reputable developer tool.
- [REMOTE_CODE_EXECUTION]: The skill automates the installation and runtime execution of the 'ast-grep' binary. This remote code is required for the skill's primary purpose of structural code analysis and is handled through established package managers and official binary releases.
- [INDIRECT_PROMPT_INJECTION]: Because the skill processes external source code that could contain malicious structural patterns, it is theoretically susceptible to indirect prompt injection. However, the skill mitigates this risk by providing pattern validation logic and encouraging a dry-run workflow before applying any code changes.
Audit Metadata