Hooks Automation

Warn

Audited by Gen Agent Trust Hub on Sep 25, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONPERSISTENCEDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The skill instructs the user to install the claude-flow@alpha package globally and relies on npx claude-flow for its core functionality. This pattern involves downloading and executing code from a remote registry at runtime.
  • [COMMAND_EXECUTION]: The hook configuration examples in .claude/settings.json utilize shell command interpolation to pass agent-provided parameters (such as ${tool.params.command} and ${tool.params.file_path}) directly into shell strings. This pattern is susceptible to command injection if the parameters contain shell metacharacters that are not strictly sanitized by the underlying CLI tool.
  • [DYNAMIC_EXECUTION]: The framework supports a script hook type that dynamically loads and executes local JavaScript files (e.g., .claude/hooks/custom-quality-check.js) using Node.js module.exports and require patterns.
  • [PERSISTENCE]: The skill provides documentation and examples for installing Git hooks (pre-commit, post-commit, pre-push) that execute automation commands. This establishes persistent execution of the skill's logic during standard version control operations.
  • [INDIRECT_PROMPT_INJECTION]: The skill provides an attack surface for indirect prompt injection by processing untrusted data which is then used to influence automated decisions and shell commands.
  • Ingestion points: Task descriptions in pre-task, file paths in pre-edit, and search queries in pre-search and post-search.
  • Boundary markers: None identified in the configuration templates to separate data from instructions.
  • Capability inventory: The skill has broad capabilities including shell command execution, file system access, and coordination of other agent tools through MCP.
  • Sanitization: While the skill documentation mentions safety checks (e.g., --check-safety), the actual implementation and effectiveness of these checks on untrusted inputs are not defined in the skill content.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 25, 2026, 09:15 AM