mastering-hooks
Pass
Audited by Gen Agent Trust Hub on Sep 1, 2026
Risk Level: SAFECOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONDATA_EXFILTRATIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The RuleZ engine enables the execution of arbitrary shell scripts via the
runandinline_scriptactions, as well as shell commands through theinject_commandaction. These features allow for complex validation logic and runtime context generation, but also present a risk if used to execute untrusted or malicious scripts. - [REMOTE_CODE_EXECUTION]: The
rulez upgradecommand facilitates the download and execution of updated binaries from GitHub releases. This self-update mechanism represents a remote code execution surface, although it is a standard feature for CLI-based development tools. - [DATA_EXFILTRATION]: The configuration schema supports external logging backends (OTLP, Datadog, and Splunk) that transmit audit logs to remote endpoints using
curl. These logs may contain sensitive information such as tool inputs, command history, and session metadata. - [PRIVILEGE_ESCALATION]: The
rulez install --globalcommand modifies the global agent configuration (~/.claude/settings.json) to register hook runners. This grants therulezbinary the ability to intercept and process events across all projects on the user's system. - [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data from tool invocations (
tool_input) and interpolates these values into the evaluation context (enabled_when) and script execution environment. If developers create rules with inadequate sanitization, this could allow for malicious tool inputs to influence policy decisions. - Ingestion points: Data enters the context via
tool_inputfields duringPreToolUseandPostToolUseevents. - Boundary markers: The system uses a structured JSON format to pass event data to scripts via
stdin, providing a clear boundary for data processing. - Capability inventory: The engine can execute shell scripts, compile regex patterns, and perform network operations via external logging backends.
- Sanitization: No specific mention of shell-escaping mechanisms for values interpolated into
inject_commandor shell script environments.
Audit Metadata