Hook Development

Pass

Audited by Gen Agent Trust Hub on Jul 28, 2026

Risk Level: SAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill includes a testing utility, scripts/test-hook.sh, which is designed to execute local hook scripts for verification purposes. This capability is restricted to the development phase and is aligned with the skill's primary purpose.
  • [PROMPT_INJECTION]: The skill provides patterns for processing external data such as tool inputs and user prompts, creating a surface for potential indirect prompt injection. The skill mitigates this by teaching and providing examples of robust input validation and sanitization.
  • Ingestion points: Data enters the hook execution context through stdin in command-based hooks (e.g., examples/validate-bash.sh) and via platform variables like $TOOL_INPUT in prompt-based hooks.
  • Boundary markers: The skill includes documentation on using defensive prompts and structured response formats (e.g., 'approve' or 'deny') to enforce execution boundaries.
  • Capability inventory: The skill facilitates monitoring of file system writes, bash command execution, and session start/end events.
  • Sanitization: Example scripts and documentation emphasize critical security checks, including path traversal detection (..), protection of sensitive directories (/etc, /sys), and preventing unauthorized credential access (.env).
Audit Metadata
Risk Level
SAFE
Analyzed
Jul 28, 2026, 08:50 AM