xray-method
Pass
Audited by Gen Agent Trust Hub on Oct 8, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and analyze untrusted source code and project instruction files (e.g.,
CLAUDE.md,AGENTS.md) from a codebase. This presents an attack surface for indirect prompt injection, where an attacker could embed malicious instructions in the code to influence the agent's behavior during analysis.\n - Evidence Chain:\n
- Ingestion points: The skill reads source files (
.py,.js,.java, etc.) and markdown documentation files viaanalyze_file.py,ast_parser.py, anddoc_review.py.\n - Boundary markers: The skill uses structured templates for output but does not employ explicit boundary markers for the analyzed content to prevent instruction following.\n
- Capability inventory: The scripts can execute shell commands (
git,grep,formatters) and perform file system operations (writing reports, modifying documentation, and rewriting comments).\n - Sanitization: Input sanitization is present for symbol names (in
usage_finder.py) and path validation is implemented (indoc_review.py) to prevent path traversal.\n- [DYNAMIC_EXECUTION]: The adapter loader inscripts/languages/_treesitter.pyuses the__import__function to dynamically load language-specific tree-sitter grammars. While the module names are derived from a hardcoded mapping (_GRAMMAR_MODULES), this pattern involves loading executable code based on variables determined at runtime.\n- [COMMAND_EXECUTION]: Several scripts utilizesubprocess.run()to invoke external utilities for project analysis:\n scripts/snapshot.pyexecutesgitcommands for repository metadata and status.\nscripts/usage_finder.pyexecutesrg(ripgrep) orgrepto find symbol references across the project. Symbol names are sanitized before being passed to the shell.\nscripts/comment_rewriter.pyexecutes a predefined list of code formatters (e.g.,ruff,black,prettier,rustfmt) to clean up source code after rewriting comments.
Audit Metadata