deploy-uni-hook
Fail
Audited by Gen Agent Trust Hub on Sep 6, 2026
Risk Level: HIGHCREDENTIALS_UNSAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [CREDENTIALS_UNSAFE]: The
hook-deploy.shscript passes theHOOK_DEPLOYER_PRIVATE_KEYdirectly as a command-line argument to theforgetool via the--private-keyflag. This action exposes the secret key in the system's process list, allowing other users or malicious processes to intercept the deployment credentials. - [COMMAND_EXECUTION]: The script
hook-deploy.shperforms unsafe sourcing of thehook.envfile using the shell's.command. Since this file is generated by the AI based on untrusted user input, an attacker can inject shell commands by tricking the AI into including shell metacharacters in the generated environment variables. - [INDIRECT_PROMPT_INJECTION]: The skill lacks robust boundaries for processing the user-supplied hook 'brief', which is used to generate both executable Solidity code and shell configuration files.
- Ingestion points: Untrusted user input enters the agent context through the
${var}brief inSKILL.md. - Boundary markers: There are no protective delimiters or specific instructions to ignore embedded commands within the brief during the generation of
Hook.solorhook.env. - Capability inventory: The skill possesses extensive capabilities, including filesystem writes, shell command execution (
forge,cast), and on-chain transaction broadcasting. - Sanitization: The provided 'static audit' is extremely brittle, relying on simple string matching with
grepthat can be easily bypassed by slightly altering the code formatting. - [DYNAMIC_EXECUTION]: The skill uses
forge testandforge scriptto compile and run Solidity code generated at runtime. This dynamic execution path, combined with the lack of effective sanitization, creates a significant risk that malicious logic could be deployed or executed within the agent's environment. - [COMMAND_EXECUTION]: The skill executes a complex sequence of shell commands and external binaries influenced by user-controlled data. While these tools are standard for smart contract development, their use in a scripted environment with inadequate validation increases the likelihood of system compromise.
Recommendations
- AI detected serious security threats
Audit Metadata