autoresearch-hooks
Pass
Audited by Gen Agent Trust Hub on Sep 14, 2026
Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONPRIVILEGE_ESCALATIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill is designed to facilitate the execution of custom shell scripts at specific points in a research loop. The instructions guide the agent to copy example scripts, modify their contents, and use
chmod +xto enable their execution.\n- [DYNAMIC_EXECUTION]: The skill relies on a pattern where the AI agent generates or adapts bash scripts which are then executed on the host system. This pattern of script generation and execution is central to the skill's functionality.\n- [INDIRECT_PROMPT_INJECTION]: The hook scripts ingest JSON data that includes fields influenced by the agent or external research results (e.g.,asi.hypothesis,metric_name). This creates a surface for indirect injection if these fields contain malicious characters that are improperly handled by the scripts.\n - Ingestion points: Hook scripts read session state JSON from stdin during the
beforeandafterevents (SKILL.md, examples/before/external-search.sh).\n - Boundary markers: No explicit boundary markers or sanitization warnings are present in the provided example scripts.\n
- Capability inventory: The scripts utilize standard shell utilities, version control tools (
git), and external CLI interfaces (search-cli,llm-cli,osascript). The output of these scripts is returned to the agent as a steer message, creating potential multi-step influence chains.\n - Sanitization: The example scripts use
jqfor parsing but do not consistently sanitize the resulting strings before interpolation into shell or sub-shell commands. Specifically, themacos-notify.shexample uses a quoting pattern in anosascriptcall that is susceptible to injection if the input strings contain double quotes or backticks.\n- [COMMAND_EXECUTION]: The example scriptexamples/after/macos-notify.shcontains a flaw where user-influenced session metadata is passed to anosascriptcommand without proper escaping, potentially allowing arbitrary code execution via AppleScript's shell execution capabilities.\n- [PRIVILEGE_ESCALATION]: The skill instructions direct the agent to usechmod +xto grant execution permissions to the newly created hook scripts in the.auto/hooks/directory.\n- [EXTERNAL_DOWNLOADS]: The documentation and example scripts reference external tools and packages, such as theqmdpackage from the npm registry for local document indexing and generic tools likesearch-cliandllm-cli.
Audit Metadata