write-contract

Warn

Audited by Gen Agent Trust Hub on Jul 23, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The skill encourages an 'Agentic Pattern' where the contract uses eval() to execute Python expressions generated by an LLM at runtime. While the instructions recommend using a restricted __builtins__ dictionary and a sandbox (gl.vm.spawn_sandbox), executing code synthesized from non-deterministic LLM output remains a significant security risk, especially when that output is influenced by user-provided natural language rules. This finding is based on the logic provided in the 'Agentic Pattern' section of SKILL.md.
  • [EXTERNAL_DOWNLOADS]: The skill mandates the inclusion of specific runner dependency hashes (e.g., py-genlayer:1jb45aa8ynh2a9c9xn3b7qqh8sm5q93hwfp7jqmwsfhh8jpz09h6). These hashes represent external, version-pinned execution environments required for the GenVM platform to execute the contract code. The skill effectively mandates the use of these remote binaries.
  • [PROMPT_INJECTION]: The 'Agentic Pattern' documentation describes a workflow that creates a surface for indirect prompt injection. Specifically, the check_rules function ingests untrusted text and rules strings directly into an LLM prompt to generate executable Python checks.
  • Ingestion points: check_rules(self, text: str, rules: str) in SKILL.md.
  • Boundary markers: The prompt template in SKILL.md lacks robust delimiters to isolate user-provided rules and text from instructions.
  • Capability inventory: The code in SKILL.md utilizes eval() and gl.nondet.exec_prompt to process and execute logic derived from untrusted input.
  • Sanitization: The execution is partially restricted by limiting __builtins__ available to the eval call.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jul 23, 2026, 04:06 PM