agents-hooks
Pass
Audited by Gen Agent Trust Hub on Oct 17, 2026
Risk Level: SAFECOMMAND_EXECUTIONDATA_EXFILTRATIONPRIVILEGE_ESCALATIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill documents and provides templates for shell-based hooks (
commandtype) which are a standard feature of the Claude Code and Codex runtimes. The provided templates (references/hook-templates.md,assets/template-preflight-runtime-hook.sh) include defensive coding practices such as explicit input validation usingjq, shell variable quoting, and avoidingeval. The templates themselves implement security guardrails, such as blocking destructiverm -rf /or force-pushes to protected branches. - [DATA_EXFILTRATION]: The documentation identifies data exfiltration via hooks as a risk and provides specific patterns to mitigate it, such as stripping
.envfiles fromgit addoperations (Claude: Strip Sensitive Files From git addtemplate) and providing guidance on redacting secrets from audit logs and notifications (references/hook-security.md). TheHTTPhook type is mentioned as a legitimate way to send audit events to SIEMs/webhooks while warning to redact secrets first. - [PRIVILEGE_ESCALATION]: The skill provides templates that explicitly check for and block the use of
sudoin destructive contexts (e.g., in thePreToolUsevalidation script). It also warns against granting broad permissions to hooks and encourages the use of narrow matchers and least-privilege principles. - [DYNAMIC_EXECUTION]: The skill explains how to use the platform's native hook system, which involves executing user-defined scripts or commands at specific lifecycle events. The analysis found no evidence of malicious dynamic code assembly; rather, it provides a structured framework for managing these platform-native execution points securely. The
!syntax (Dynamic Context Injection) was not detected inSKILL.md. - [SAFE]: The external resources referenced (
code.claude.com,developers.openai.com,github.com/anthropic/*) belong to trusted organizations and well-known services. The skill author,vasilyu1983, follows standard patterns for providing documentation and utility scripts for these platforms without introducing malicious behaviors. The AST-flaggedsubprocess.runandrm -rfpatterns are contained within diagnostic test scripts (scripts/test_hook_templates.py) and security guardrail templates that are designed to block such commands, not execute them maliciously.
Audit Metadata