generating-orm-code
Warn
Audited by Gen Agent Trust Hub on Mar 12, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The
generate_scriptfunction inscripts/generate_model.pyandscripts/generate_schema.pyconstructs shell scripts using simple string interpolation. Thetemplatecontent, which is sourced from the--contentcommand-line argument, is embedded directly into a Bash script template without any form of escaping or sanitization.\n- [PRIVILEGE_ESCALATION]: Both generation scripts include a call tofile_path.chmod(0o755)after writing the generated Bash script to disk. This explicitly grants execution permissions to the dynamically created file, facilitating the execution of potentially malicious code derived from unsanitized inputs.\n- [INDIRECT_PROMPT_INJECTION]: The skill architecture is vulnerable to indirect prompt injection because it processes external data for code generation.\n - Ingestion points: Input strings passed to the
--contentand--titlearguments in the generation scripts (derived from user model definitions or database schemas).\n - Boundary markers: None. Input content is directly interpolated into generated markdown and shell script templates.\n
- Capability inventory: The agent is authorized to use
Bashtools for PostgreSQL, MySQL, and MongoDB, and has the ability to write and edit files on the system.\n - Sanitization: There is no logic present in the Python scripts to validate, sanitize, or escape the content before it is converted into an executable script.
Audit Metadata