Title: fix(deps): build isolated-vm on install via root trustedDependencies by waleedlatif1 · Pull Request #5935 · simstudioai/sim · GitHub
Open Graph Title: fix(deps): build isolated-vm on install via root trustedDependencies by waleedlatif1 · Pull Request #5935 · simstudioai/sim
X Title: fix(deps): build isolated-vm on install via root trustedDependencies by waleedlatif1 · Pull Request #5935 · simstudioai/sim
Description: Summary isolated-vm now builds on bun install — no more manual npm rebuild for every contributor Root cause was .npmrc with ignore-scripts=true, a blanket switch that overrode Bun's trustedDependencies allowlist and blocked every lifecycle script, including this repo's own root scripts That line landed in the May 2025 Bun migration (#371), seven months before isolated-vm was introduced (#2385). Two later commits added isolated-vm to trustedDependencies — root in #2387, then apps/sim in #2613 — and both were silently inert Deleted .npmrc; lifecycle policy now lives solely in root trustedDependencies, and added isolated-vm to it Removed the trustedDependencies block from apps/sim/package.json — Bun only reads the root list, so it never had any effect and was what misled the two earlier fixes Dropped the now-dangling .npmrc entry from CODEOWNERS Why this doesn't widen the supply-chain surface Naming any package in trustedDependencies replaces Bun's curated default-trust list rather than adding to it (verified: with trustedDependencies: ["nothing-real"], isolated-vm does not build even though it is on Bun's default list). So the allowlist is deny-by-default and the only packages permitted to run install scripts are isolated-vm and sharp. Everything currently blocked stays blocked — esbuild, core-js, protobufjs, ssh2, cpu-features, bufferutil, free-email-domains, ffmpeg-static. bunfig.toml's minimumReleaseAge supply-chain gate is untouched. isolated-vm's install script is prebuild-install || node-gyp rebuild. We already execute that exact binary as the sandbox for all untrusted user code, so running its installer adds no trust we don't already extend. Side effect worth knowing The .npmrc switch also blocked the repo's own root scripts, so husky's prepare never ran and core.hooksPath was unset — the pre-commit lint-staged hook has not been active for anyone who installed since May 2025. It installs correctly now (the hook ran on this PR's commit). Testing Verified in an isolated worktree, baseline vs. after on a clean node_modules: before after isolated-vm/out/isolated_vm.node absent built ffmpeg-static binary absent absent (unchanged) core.hooksPath unset .husky/_ Binary loads under the real runtime: node -e "require('isolated-vm')" → evalSync('40+2') = 42 ABI targeting is correct — prebuild-install runs under the node on PATH, not Bun, so it fetched node-v127 matching local Node 22 rather than Bun's claimed 24.3.0. That is the same Node that spawns the worker in lib/execution/isolated-vm.ts Upstream publishes prebuilds for node ABI v127/v137 across linux x64/arm64 (incl. musl), darwin-arm64 and win32-x64, covering the Blacksmith ubuntu-2404 x64/arm64 runners. Intel macOS has no prebuild and compiles from source — the same as the manual npm rebuild it replaces bun install --frozen-lockfile (the CI path) exits 0 bun run lint:check clean across all 19 tasks Docker unaffected: all three Dockerfiles pass --ignore-scripts explicitly and rebuild isolated-vm against the Node ABI by hand, so .npmrc was never load-bearing there Type of Change Bug fix Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary isolated-vm now builds on bun install — no more manual npm rebuild for every contributor Root cause was .npmrc with ignore-scripts=true, a blanket switch that overrode Bun's trustedDep...
X Description: Summary isolated-vm now builds on bun install — no more manual npm rebuild for every contributor Root cause was .npmrc with ignore-scripts=true, a blanket switch that overrode Bun's truste...
Opengraph URL: https://github.com/simstudioai/sim/pull/5935
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f12de7b4-7885-7927-fee7-661e9a6dc890 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B72C:1C88A1:61B1D5:8B5643:6AFB434C |
| html-safe-nonce | 7e2922aaf1a92fd39e458a8c15e61217c4d3c440cacc90ce0170dfae518609a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzJDOjFDODhBMTo2MUIxRDU6OEI1NjQzOjZBRkI0MzRDIiwidmlzaXRvcl9pZCI6IjEyNDUyNDg0OTg1MTM0MjkzMjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 266cbe5a2e86d933e01441f6a37165e12613a5d773198b9894617bf78e4d250a |
| hovercard-subject-tag | pull_request:4127164607 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5935/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary isolated-vm now builds on bun install — no more manual npm rebuild for every contributor Root cause was .npmrc with ignore-scripts=true, a blanket switch that overrode Bun's trustedDep... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a6c2f87cbcb6414452377b4967858ed6a66f1109 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width