hooks-builder

Pass

Audited by Gen Agent Trust Hub on Apr 2, 2026

Risk Level: SAFECOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONDATA_EXFILTRATION
Full Analysis
  • [COMMAND_EXECUTION]: The skill provides multiple examples of shell and TypeScript scripts designed to be executed by the local environment. Examples include scripts for auto-formatting (format.sh), command guarding (guard.sh), and agent loop automation (grind.ts). It specifically instructs users to use chmod +x to enable execution of these scripts.
  • [REMOTE_CODE_EXECUTION]: One example hook utilizes npx prettier to format files. The use of npx can result in the automatic download and execution of packages from the npm registry if they are not already installed locally.
  • [DATA_EXFILTRATION]: The documentation identifies that environment variables containing sensitive information, such as CURSOR_USER_EMAIL, are accessible to any hook script. While no exfiltration code is present in the examples, this exposure provides a vector for scripts to access and potentially transmit user identity information.
  • [INDIRECT_PROMPT_INJECTION]: The skill describes a system where untrusted data from the agent loop is processed by scripts, creating a potential injection surface.
  • Ingestion points: Example scripts in SKILL.md ingest JSON data from the agent's execution context via stdin using input=$(cat) or json.load(sys.stdin).
  • Boundary markers: No delimiters or instructions are provided to the scripts to distinguish between data and potential control sequences.
  • Capability inventory: The scripts possess the capability to execute shell commands (npx, python3) and perform file system operations.
  • Sanitization: The example auto-formatter script extracts a file_path from agent input and interpolates it directly into a shell command (npx prettier --write "$file_path") without sanitization, which could lead to command injection if an agent processes a file with a maliciously crafted name.
Audit Metadata
Risk Level
SAFE
Analyzed
Apr 2, 2026, 06:13 PM
Security Audit — agent-trust-hub — hooks-builder