create-hook
Warn
Audited by Gen Agent Trust Hub on May 24, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/scaffold.pyscript contains a code generation vulnerability in thecreate_skillfunction. It uses Python's.format()method to interpolate the user-provideddescriptionargument directly into theexecute.py.jinjatemplate. Because there is no sanitization on this input, an attacker can provide a description that breaks out of the string literal in the generated Python script to execute arbitrary commands. - [PROMPT_INJECTION]: The
create_sub_agentandcreate_commandfunctions inscripts/scaffold.pyinterpolate the unsanitizeddescriptionfield into Markdown-based agent and command templates. This enables instruction injection into the generated artifacts, which could be used to manipulate the behavior of sub-agents or slash commands created by the tool. - [COMMAND_EXECUTION]: The skill instructions in
SKILL.mddirect the agent to execute thescaffold.pyscript using theBashtool. While the specific example provided forcreate-hookis safer due to JSON serialization, the inclusion of the broader, vulnerable scaffolding logic within the skill's package poses a risk if the agent is tasked with creating other resource types using the same tool.
Audit Metadata