ast-grep

Pass

Audited by Gen Agent Trust Hub on Sep 28, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and process source code from the repository using structural search patterns, which presents a risk of indirect prompt injection if the code contains malicious instructions or structural patterns intended to mislead the agent.
  • Ingestion points: Source code files processed by ast-grep search and rewrite commands.
  • Boundary markers: The workflow relies on the agent's interpretation of tool output and specifies a manual diff review, but lacks strict boundary markers or sanitization for code content displayed in the context.
  • Capability inventory: The skill possesses the capability to perform repository-wide code searches and modifications (rewrites) through the ast-grep utility.
  • Sanitization: The instructions in references/safety-and-review.md mandate a "preview-before-apply" workflow and a review checklist to mitigate unintended changes.
  • [DYNAMIC_EXECUTION]: The skill includes a helper script scripts/scaffold-ast-grep-command.mjs that dynamically constructs shell commands based on user-provided arguments.
  • Evidence: The Node.js script uses string concatenation to assemble ast-grep command lines from input variables such as patterns, rewrites, and globs. While it utilizes a shellQuote function for escaping, the runtime generation of executable command strings is a characteristic of dynamic execution.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 28, 2026, 05:29 PM