codemod-generator
Warn
Audited by Gen Agent Trust Hub on Oct 1, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill instructions (Step 5b) direct the agent to execute the transformation scripts and test files it has just generated. This execution of dynamically generated code is performed using tools like
node,npx jscodeshift, andnpx jest. If a user provides malicious input that is interpolated into these scripts, the agent will execute it during the verification phase. - [COMMAND_EXECUTION]: The
migrate.jstemplate provided in Step 3 utilizes thechild_processmodule andexecSyncto orchestrate multiple codemods. This pattern is vulnerable to command injection if the filenames or descriptions generated from user input include shell metacharacters. - [INDIRECT_PROMPT_INJECTION]: The skill acts as a transformation engine for external codebases based on user-provided migration rules, creating a high-privilege attack surface.
- Ingestion points: User-provided migration definitions, token names, and prop mappings gathered in Step 0.
- Boundary markers: The instructions advise the agent to ask for clarification if the request is unclear, but do not specify technical delimiters or strict input schemas to isolate untrusted data.
- Capability inventory: The skill has access to
Bashfor runningnode,jscodeshift,jest,vitest, andtsc, as well as broad file read/write permissions. - Sanitization: The agent is instructed to use
TODOcomments for complex patterns, but there is no explicit guidance on sanitizing user-provided strings before they are embedded into the executable scripts it generates.
Audit Metadata