claude-hook-writer
Pass
Audited by Gen Agent Trust Hub on Sep 15, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill documents the creation of prompt-based hooks that analyze potentially untrusted file content, creating an attack surface for indirect prompt injection.
- Ingestion points: Hook input received via stdin during tool execution events.
- Boundary markers: The skill recommends using JSON schema validation to constrain hook outputs.
- Capability inventory: Hooks can trigger shell commands, modify files, and block tool operations using specific exit codes.
- Sanitization: The documentation provides extensive advice on validating JSON fields and sanitizing file paths using
jqand bash patterns. - [COMMAND_EXECUTION]: The skill provides templates for executing shell commands and local CLI utilities within a hook environment.
- Evidence: Templates in
references/code-templates.mddemonstrate the use ofprettier,black,gofmt, andgit. - Safety context: The skill explicitly instructs on the use of variable quoting and absolute paths to prevent common execution vulnerabilities.
- [DYNAMIC_EXECUTION]: The skill provides a pattern for using the
evalcommand to process multiple JSON fields simultaneously. - Evidence: The
references/quick-reference.mdfile contains a snippet usingevalwithjq's@shfilter. - Safety context: The use of the
@shfilter ensures that values are properly escaped for shell evaluation, mitigating injection risks.
Audit Metadata