Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of create-director-app

[email protected]

suspicious   confidence 55%   action isolate   analyzed 2026-09-24 23:35 UTC by yolo in 7 tool calls, with lab detonation

Summary

Preinstall hook setup_bun.js downloads and executes the Bun installer from https://bun.sh/install (legitimate source) via curl|bash — a download-execute chain. Main flow fetches templates from director.ai and scaffolds a new project including a .cursorrules file. Lab hook crashed (ESM vs CommonJS mismatch), so runtime behavior unconfirmed.

Intent

An NPX utility that generates Stagehand browser-automation projects from templates hosted on director.ai. The preinstall hook attempts to download and install the Bun runtime from bun.sh (official source), which is unexpected for a project scaffolding tool.

download_execute reconnaissance

Findings

Download-execute chain from bun.sh medium setup_bun.js:71-74
preinstall hook runs 'curl -fsSL https://bun.sh/install | bash' (Linux/macOS) or 'powershell -c "irm bun.sh/install.ps1|iex"' (Windows) to install the Bun runtime. Source is legitimate but the pattern is download-execute.
Environment passed to spawned child processes low setup_bun.js:137
spawn() calls forward the full process.env (including API keys, tokens) to child processes. Standard practice but could leak credentials to the Bun installer if network-capable.
PATH modification via shell profile reading low setup_bun.js:31-55
Reads .bashrc, .bash_profile, .profile, .zshrc to update process.env.PATH. Benign reconnaissance for PATH, not persistence.
Creates .cursorrules in new projects low dist/template-fetcher.js:122
Generated project includes a .cursorrules file (AI agent config) with Stagehand development guidelines. Not written to user's home directory; scoped to new project.
Preinstall hook failed in lab (ESM/CJS mismatch) info setup_bun.js:2
Hook crashed with 'require is not defined in ES module scope' because package.json has "type": "module" but setup_bun.js uses CommonJS require(). Runtime behavior unconfirmed.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 6. Hooks: preinstall (exit 1), require (exit 0).