create-hook
Warn
Audited by Gen Agent Trust Hub on May 5, 2026
Risk Level: MEDIUMPROMPT_INJECTIONCOMMAND_EXECUTIONDATA_EXFILTRATIONREMOTE_CODE_EXECUTION
Full Analysis
- [PROMPT_INJECTION]: The skill instructions provide a method to "auto-approve subagent permissions" by configuring a
PermissionRequesthook with a prompt handler. This pattern specifically targets and bypasses human-in-the-loop (HITL) security controls, allowing potentially untrusted subagents to perform sensitive actions without user confirmation. - [COMMAND_EXECUTION]: The skill uses the
$ARGUMENTSvariable to seed the hook design process. This creates a surface for command injection if the input is not sanitized before being passed to shell commands. Theevals/evals.jsonfile explicitly lists injection strings like'my_app; rm -rf /'as test cases for the agent's validation logic. - [DATA_EXFILTRATION]: Hooks generated by this skill for
PreToolUseandPostToolUseevents have access to the full context of tool interactions. This provides an opportunity for sensitive information, such as file contents or API responses, to be intercepted and exfiltrated if the hook's command handler is directed to a remote endpoint or external file. - [REMOTE_CODE_EXECUTION]: The skill is designed to generate
hooks.jsonentries that can execute arbitrary shell commands via thecommandhandler. This allows for persistent execution of code triggered by specific agent events. This also introduces an indirect prompt injection surface: - Ingestion points: Agent lifecycle events such as
PreToolUseandPermissionRequest(documented inSKILL.md). - Boundary markers: None provided in the instructions to separate event data from the hook's execution logic.
- Capability inventory: Hooks can execute
Bashcommands and provide prompts to the agent. - Sanitization: The skill does not instruct on sanitizing event data before it is processed by the generated hook handlers.
Audit Metadata