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 (command type) 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 using jq, shell variable quoting, and avoiding eval. The templates themselves implement security guardrails, such as blocking destructive rm -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 .env files from git add operations (Claude: Strip Sensitive Files From git add template) and providing guidance on redacting secrets from audit logs and notifications (references/hook-security.md). The HTTP hook 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 sudo in destructive contexts (e.g., in the PreToolUse validation 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 in SKILL.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-flagged subprocess.run and rm -rf patterns 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
Risk Level
SAFE
Analyzed
Oct 17, 2026, 08:26 AM