creating-tools
Warn
Audited by Gen Agent Trust Hub on Sep 29, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/record-run.mjsexecutes arbitrary commands usingnode:child_process.spawnSync. The command and its arguments are passed directly from user/agent input, allowing for the execution of any binary available on the system. - Evidence:
scripts/record-run.mjs(lines 90-95):result = spawnSync(command[0], command.slice(1), { stdio: ["inherit", logFd, logFd], env: { ...process.env, RUN_OUTPUT_DIR: absOut } }); - [COMMAND_EXECUTION]: The scripts
scripts/record-run.mjsandscripts/scaffold-tool.mjsuse the--docs-dirargument to construct file system paths without sanitization or validation. This could allow an attacker to specify paths that lead to directory traversal, causing the scripts to create directories or write files outside the intendeddocs/tools/hierarchy. - Evidence:
scripts/scaffold-tool.mjs(lines 89-91):const toolDir = join(docsDir, slug); mkdirSync(join(toolDir, "runs"), { recursive: true }); - Evidence:
scripts/record-run.mjs(lines 80-84):const toolDir = join(docsDir, slug); if (!existsSync(toolDir) || !statSync(toolDir).isDirectory()) { ... } - [DYNAMIC_EXECUTION]: The skill implements a pattern where
scaffold-tool.mjsgenerates a directory structure andrecord-run.mjsexecutes code within that structure. This runtime execution of dynamically identified tools constitutes dynamic execution. - Evidence:
scripts/record-run.mjs(lines 90-95) executes the command provided at runtime. - [INDIRECT_PROMPT_INJECTION]: The
scaffold-tool.mjsscript performs unsanitized string interpolation of user-provided inputs (slug,type,repo,path) into aREADME.mdfile using a template. These files are intended to be read by the agent in future interactions, creating an attack surface for indirect prompt injection if the inputs contain malicious instructions. - Ingestion points: Command-line arguments
slug,--type,--repo, and--pathinscripts/scaffold-tool.mjsentering the agent context via the generated README files. - Boundary markers: Absent in the generated
README.mdfiles. - Capability inventory: The agent has the capability to execute commands via
record-run.mjsand write files viascaffold-tool.mjsandrecord-run.mjsacross thescripts/directory. - Sanitization: Absent; the script uses
replaceAllto directly insert values into the markdown content. - Evidence:
scripts/scaffold-tool.mjs(lines 102-108):const rendered = readFileSync(template, "utf8").replaceAll("{{SLUG}}", slug).replaceAll("{{TYPE}}", type).replaceAll("{{MODEL}}", model).replaceAll("{{REPO}}", repo || "self-contained").replaceAll("{{PATH}}", relpath || "./").replaceAll("{{DATE}}", today);
Audit Metadata