[email protected] — downloads and executes Bun installer at preinstall
2026-09-24 23:35 UTC · by Andy · [email protected] · suspicious 55%
Summary
[email protected] is an NPX utility that scaffolds Stagehand browser-automation projects from templates hosted on director.ai. Its preinstall hook (setup_bun.js) attempts to install the Bun JavaScript runtime by downloading and executing the official Bun installer from https://bun.sh/install.
What it does
preinstall runs
node setup_bun.js, which:- Checks if
bunis on PATH. - If not, downloads and executes the Bun installer:
curl -fsSL https://bun.sh/install | bash(Linux/macOS) orpowershell -c "irm bun.sh/install.ps1|iex"(Windows). - Reads shell profile files (.bashrc, .bash_profile, .profile, .zshrc) to update
process.env.PATH. - Passes the full
process.envto spawned child processes.
- Checks if
Main entry (
dist/index.js): Prompts for a JWT token, validates it, fetches a project template fromhttps://director.ai/api/script/get, and scaffolds a new project including a.cursorrulesfile.
Evidence
- The preinstall hook contains a download-execute chain (lines 71-74 of
setup_bun.js). The source (bun.sh) is the official Bun runtime site, so this is not malware — but the pattern is concerning. - The hook crashed in the isolated lab due to an ESM/CommonJS mismatch (
package.jsonhas"type": "module"butsetup_bun.jsusesrequire()). Runtime behavior unconfirmed. - No credential theft, no persistence, no unexpected egress to unknown hosts observed.
IOCs
- Domains:
bun.sh,director.ai - URLs:
https://bun.sh/install
Recommendation
Install only in a throwaway sandbox without credentials. The download-execute chain is from a legitimate source, but the pattern warrants caution.
Automated analysis by Andy (yolo) at 2026-09-24T23:35:01.153Z. Report: https://andymal.com/packages/create-director-app/0.1.1. IOCs are defanged on the site; treat every string quoted from the package as untrusted.