🌳 JavaScript · deploying · sharing tools
A story about shipping JavaScript.
Philipp Dunkel · @pipobscure.com
github.com/pipobscure/bundles
Open with the question, not the tool. Everyone in this room has deployed something and later wondered what was really running on that box. This talk is a story in four parts: the server, the tools we share, what had to exist before any of this could work, and what you can do now. The tool is called bundle, it is open source, and it is experimental: it needs Node 26.11 and a flag. Say that now so nobody feels tricked at the end.
I · On the server
# deploying, 16:40 on a Tuesday
$ git pull && npm install --production
npm ERR! fetch failed registry.npmjs.org/…
npm ERR! 503 Service Unavailable
# the code hadn’t changed.
# the build had.
The registry sits in the path of every deploy, and you don’t run it.
Jul 2026
Publish and install failures
Dec 2025
Can’t reach the registry
Jun 2025
Install, publish and login failing
Dec 2024
Installs fail in one region
20 install or registry incidents since Oct 2023, 9 of them major.
Start where most of us started: a web service, and a deploy that runs npm install on the server. The registry sits in the path of every deploy, and you don't run it. These are npm's own words, from status.npmjs.org: of the 50 most recent incidents it publishes (Oct 2023 to Jul 2026), 20 affected installing or reaching the registry, and 9 of those were flagged major. Say it's their number, not yours. The list is a window, not the whole history, so re-check it before presenting (slides/data/npm-incidents.json is the cached copy; node slides/tools/refresh-chart.mjs refreshes it). The code you deploy didn't change; the deploy failed anyway. Concede the obvious objection: lockfiles fixed which versions. They didn't take the network out of the deploy.
I · On the server
$ npm install
added 214 packages in 9s
# which 214?
# from where?
# and what just ran?
^1.2.0 means “whatever the registry says today”.
Not when you released, and not when you tested.
postinstall scripts run before anyone has looked at anything.
Two installs of one version can differ, and nobody can say how.
"When you publish version 1.4, you think you shipped 1.4. What you actually shipped is a recipe, and the server cooks it." The 214 packages line always gets a laugh, because everyone has seen it. Even when the registry is up, resolving at deploy time can give you a different tree than an hour ago: a version range is a question you ask the registry again on every install. Then three things follow: it's decided late, it runs code while deciding, and nothing records what happened.
I · On the server
2018
A helpful new maintainer, then a wallet stealer in a dependency.
2021
An account taken over. Millions of weekly installs shipped a miner.
2024
Years of patient social engineering, for one backdoor.
2025
A worm: it steals CI tokens and publishes itself onward.
Each was published correctly. You asked for a version, you got that version, and you still got owned.
Six months after that deploy, someone asks: what exactly is running on that box? Walk the arc, don't read the list: an accident-shaped trust problem, then targeted theft, account takeover, patient infiltration, and finally a worm that spreads by itself. xz isn't npm, which is the point: this is how software gets attacked now. For Shai-Hulud, the safe framing is "hundreds of packages across two waves in late 2025, and CISA issued an advisory"; don't quote a precise count from the stage. The punchline: version numbers didn't help, because every one of these was a correctly published version.
I · On the server
Pin which versions. The network and the install scripts are still in the deploy.
Same bytes everywhere. You ship an operating system, and npm ci still ran inside it.
One JS file, until templates, native addons or a dynamic require fall out of it.
One file, but you can’t look inside, and it is rarely signed over the whole thing.
All of them work. None tells you, months later, exactly what runs and who put it there.
Don't trash any of these; the room uses all four and they all work. Lockfiles fixed which versions you get. Containers fixed "same bytes everywhere", at the cost of shipping an OS to run one service. Bundlers like esbuild or ncc collapse the JavaScript but leak everything that isn't an import. pkg, bun build --compile and Node SEA give you one file, but it's opaque. Land the last line: none of them answers the question from the previous slide.
II · Sharing tools
how it usually goes
$ git clone … && cd tool
$ nvm use 20 # works on 18?
$ npm ci # hundreds of MB
$ npm link # on PATH. somewhere.
how it should go
$ curl -O …/tool
$ ./tool
# that’s it
A CLI is one file, or it’s a support ticket.
The second half of the story. The web service is under control-ish, and now you build tooling: a deploy helper, a code generator, a linter config, something the whole team uses. Getting it onto ten laptops means shipping an install procedure, and then supporting it. "The single best usability improvement I ever made to an internal tool was deleting its installation instructions."
II · Sharing tools
Which version does your colleague have? Does CI run the one you run?
“Please pull and re-link.” Half the team does.
Five CLIs that only work together at matching versions.
npm i -g from a stranger runs their install scripts as you.
Same problem as the server, just multiplied by every laptop, and with no ops team watching. Consistency is the theme: the same tool, at the same version, on every machine and in CI, and a way to move everyone forward together. And then the stranger's tool: installing it globally runs their code before you've looked at it.
II · Sharing tools
One file, decided when we release
Runs by name, no install step
Says who built it, and can’t change afterwards
Others can vouch for it, or warn us off
The same thing in CI, on laptops and on servers
The pivot of the talk. Present it as what it is: a wish list, the one anyone in the room would write after the last few slides. Read the five wishes slowly; everything after this slide ticks one of them off. Don't ship the recipe, ship the meal: one file, frozen when you release it, signed, and run as it is, and then let other people say things about that file.
III · What had to exist first
// survives a bundler
import helper from './helper.js'
// does not
readFileSync(join(__dirname, 'mail.html'))
require(`./plugins/${name}`)
process.dlopen(m, './addon.node')
Module resolution and every fs call assume the tree is on a real disk.
So teach the runtime that a file can be a directory.
Now the mildly technical part: what had to exist before any of the wish list was possible. Every bundler bug you've filed is downstream of this. The bundler rewrote the imports it could see; then a library read a template next to itself, or did a dynamic require, and it fell over in production. Instead of teaching the bundler more file types, teach Node that one file can be the directory the app runs in. Then __dirname, assets, addons and dynamic require all just work, because nobody special-cased them.
III · What had to exist first
v26.8
Read, write and stream ZIP archives, built into Node.
why
A format every tool already opens. It still reads with a launcher in front of it, and malformed or oversized archives are refused.
import { ZipEntry, createZipArchiveSync } from 'node:zlib';
const zip = createZipArchiveSync([
ZipEntry.createSync('package.json',
Buffer.from('{"main":"index.js"}')),
ZipEntry.createSync('index.js',
Buffer.from('console.log("hi")')),
]);
writeFileSync('app.zip', Buffer.concat([...zip]));
$ unzip -Z1 app.zip
package.json
index.js
ZIP support in node:zlib: ZipEntry, ZipFile, ZipBuffer and createZipArchive. The code on the right is real and runs on a stock Node 26: two entries, an archive, written to app.zip. Why ZIP: it's the format everyone's tools already open, so unzip lists it, with no special tooling. Two details make the single-file trick work: an archive can sit behind other bytes, like a #! launcher, and still read correctly; and it refuses malformed records and zip bombs. ZIP is easy to get subtly wrong, which is why it went through a long review with security researchers. Keep app.zip in mind; it comes back two slides from now.
III · What had to exist first
v26.4 · by Matteo Collina
An fs-shaped file system whose files come from a pluggable provider, mounted at a path.
why
Every fs call under the mount goes to the provider, so code that reads files keeps working, unchanged. A ZipProvider (v26.9) mounts an archive.
import * as vfs from 'node:vfs';
const mem = new vfs.MemoryProvider();
mem.writeFileSync('/hello.txt', 'hi from memory');
const root = vfs.create(mem).mount(); // /dev/null/vfs/1
readFileSync(`${root}/hello.txt`, 'utf8');
// 'hi from memory'
node:vfs is Matteo Collina's work: an fs-shaped API backed by a provider, memory, a real directory, or anything else, mounted at a path Node picks. Walk the code: a file written into a MemoryProvider, the provider mounted, and then plain readFileSync, the ordinary node:fs, reads it back from the mount point. That's the point: code that reads files doesn't change at all. The ZipProvider (v26.9) is the bridge between the two slides: it is a provider whose files come from an archive, so a zip mounts as a directory.
III · What had to exist first
v26.10 · addons v26.9
require, import, package.json lookup and format sniffing all resolve inside the mount.
why
__dirname, assets and dynamic requires just work. Worker threads see the same mount, and native addons load from it too.
import * as vfs from 'node:vfs';
import { ZipFile } from 'node:zlib';
const zip = await ZipFile.open('app.zip');
const root = vfs.create(new vfs.ZipProvider(zip)).mount();
await import(`${root}/index.js`);
// hi
The third piece: module loading that knows about mounts. Same app.zip as two slides ago, mounted with the ZipProvider, and then a plain dynamic import of its index.js, which prints hi. Under the hood, four module-resolution primitives (reading package.json, finding the nearest scope, legacy main resolution, and sniffing whether an extensionless file is ESM) go through a VFS-aware path, so require and import resolve inside the mount, and behave exactly as before when nothing is mounted. That's why __dirname, templates next to the code, and dynamic requires work without a bundler rewriting anything. Worker threads inherit the mount, so code can't spawn a worker that escapes it. Native addons were their own change: dlopen needs a real path, so the addon's bytes are loaded from a private image, an anonymous memfd on Linux.
III · What had to exist first
v26.10
Mounts a directory or an archive where Node chooses, and runs its package.json main.
why
One flag, so a two-line #! launcher makes a zip a program. Refused in NODE_OPTIONS: the environment can’t redirect what runs.
$ node --experimental-vfs --vfs-load=app.zip
hi
$ NODE_OPTIONS="--vfs-load=app.zip" node
node: --vfs-load= is not allowed in NODE_OPTIONS
The fourth piece, and the one that makes it a program: --vfs-load. All of the last slide in one flag: it mounts a directory or a zip, chosen by its content rather than its name, at a mount point Node picks so it never shadows a real path, and runs the package.json main. Again the same app.zip, again hi. The second command is the safety rail: --vfs-load is refused in NODE_OPTIONS, because which program runs is the command line's decision, and the environment must not be able to redirect every node on the machine. And because the flag names its source, a two-line shell launcher in front of the zip can pass the file's own path: that's how a .nzip runs by name, which we'll see in part four.
III · What had to exist first
v26.4
A file system with pluggable providers. By Matteo Collina.
v26.8
Read and write archives, reviewed with security researchers.
v26.9
Mount an archive as a directory. Native addons load from it.
v26.10
Run a program straight out of the archive.
Stock Node from nodejs.org, behind --experimental-vfs. No fork, no patches.
Before 26.10, running this meant a patched Node, built from source on every server: 30 to 90 minutes. Now it’s the download.
The summary: we shipped it. Point back at the last two slides; these are the same four pieces, all upstream and all released. node:vfs is Matteo Collina's work, and it's the foundation. On top of it: ZIP support in node:zlib (nodejs/node#64339), which went through a long review with security researchers, because ZIP is easy to get subtly wrong and every mistake is a security hole. Then the ZipProvider (#64915) and native addons from a mount (#65680). Then --vfs-load (#65748), the keystone: node --vfs-load=app.nzip runs the app inside. The bottom line is why upstream mattered in practice: before 26.10, deploying this way meant a 30 to 90 minute source build of a patched Node on each server.
III · What had to exist first
npm: @pipobscure/bundle · a CLI and an API
record
Run the app once, and write down every file it reads.
create
Archive exactly those, with a launcher in front.
sign · attest
Say who built it, and let others say what they found.
install · update
Onto your PATH, and kept current.
publish · search
Names in your own Atmosphere account.
suites · plugins
Toolsets, and apps that take plugins.
Node mounts the tree and runs it.
node:vfs · zip · --vfs-load
Node gives us the primitive: a tree in one file, mounted and run. Everything people actually do with such a file lives in userland, in one ordinary npm package, @pipobscure/bundle, with a CLI and an API that does everything the CLI does. Walk the six briefly; each gets its own slide later, so don't explain them here. record runs the app once and writes down every file it opens, which beats static analysis. create builds the archive, with a two-line launcher in front so it runs by name. sign and attest say who built it, and let others say what they found. install and update get it onto your PATH and keep it current. publish and search give it a name in your own Atmosphere account. suites and plugins cover toolsets and apps that take plugins. Why not in Node: this part has to move fast and stay replaceable, and the runtime should stay small. And the bundle command is itself shipped as a bundle.
III · What had to exist first
1 · observe
Run the app once and write down every file it reads.
2 · create
Archive exactly those files. Same files, same bytes.
3 · audit
Review it against the last release: you, or Claude in CI.
4 · sign
Only if the review came back clean.
# release.yml
permissions:
id-token: write # that’s the key
Sigstore signs as your CI workflow, or as your browser sign-in on a laptop.
Users can require exactly that workflow, on main.
The second prerequisite: signing that doesn't mean managing keys. Sigstore issues a short-lived certificate for an identity you already have: your GitHub Actions workflow in CI, a browser login on your laptop. Nothing to store, nothing to leak. And signing is its own step, after an audit: observe, create, audit, sign. Recording beats static analysis because it catches dynamic requires and data files; the unused module in your source simply isn't in the archive. Archives are reproducible: the same files make the same bytes. bundle's own releases go through exactly this, with the audit done by Claude against the previous release.
III · What had to exist first
publisher
“mdview is at this URL.” Releases stay where they are.
curator
“These go together, and each must carry this.”
auditor · scanner · IT
“Audited”, “permitted”, “malware”, about one file’s hash.
Each one is a record in their own Atmosphere account, any provider.
Checked against the owner’s key with nothing but node:crypto.
You hold the policy: whose word counts, and whose warning stops an install.
An open index only says whom to ask.
The third prerequisite, and the one people don't expect: accounts that already exist. If you have an Atmosphere account, from whichever provider, you already have a place to publish signed records that anyone can verify without trusting the server. Every role writes only to its own account: the publisher says where the file is, the curator says what goes together, the auditor or scanner or your IT department says what they think of a file. A backlink index (Constellation) helps find records, but every record is fetched from its owner and checked against their key. Nobody runs a registry, so there's nothing in the middle to compromise. You don't need an account to install; only to publish names or attestations.
IV · What you can do now
$ bundle create --base ./app -f app.manifest --launcher -o greet.unsigned.nzip
* unsigned archive (3 members, sha256 digests)
$ bundle sign greet.unsigned.nzip
* wrote greet.nzip (1904 bytes)
$ ./greet.nzip Grace
hello, Grace
$ head -2 greet.nzip
#!/bin/sh
exec node --no-warnings --experimental-vfs --vfs-load="$0" -- "$@"
Only the files the app read.
unzip -l shows everything in it.
No node_modules, no install step.
Demo, or show the slide if the network is bad. The app was recorded first (the observe step), so the archive holds exactly the three files it read, and the unused module in the source isn't there. --launcher puts a two-line shell script in front of the zip, so the file runs by name. The signature covers the whole file, launcher included. That's wishes one and two from the list: one file, decided at release, runs by name. On Windows, bundle install sets up a .nzip file association so the same file runs by name there too.
IV · What you can do now
$ bundle install @alice.example/tool
* tool: sha256:3f1a… (signed)
1 signed by …/acme/tool/.github/workflows/release.yml@refs/heads/main — new
2 attested by audit.acme.com as audited — trusted by policy
WARNING scanner.example as malware — marked it bad
* accept which? numbers (1,2), 'all', or Enter to decline:
Fetch, check, move into place. No install scripts.
Your answer is remembered for every update.
A URL, a domain, or a name someone published.
Think of it as curl-pipe-sh with the two scary parts removed: nothing runs to install it, and nothing lands on disk unless it checks out. A file that doesn't match its signature is refused outright, so a tampered download never lands. Walk the prompt: a signer you haven't seen before is a question; an auditor your policy trusts goes straight through; a warning from a stranger is shown, not obeyed, because anyone can publish one, while a warning from someone you listed refuses it outright. Three ways to name an app: a URL, a domain whose TXT record says where, or a published name like this one. Next slide: the same install, without a terminal.
IV · What you can do now
on your page, README or post
<a href="nzip:alice.example/devtools">
Install devtools
</a>
🌳 Install devtools
→
bundle opens a window with the same review and the same questions.
Once bundle is installed, the browser hands nzip: links to it.
A link names something published. A page can’t point bundle at any old file.
A plugin’s link installs it into its app. publish prints the link.
This is the one people underestimate. Once bundle is installed, it registers itself for nzip: links on Linux, macOS and Windows. An author puts a link on their page, their README, or in a chat message or a post; clicking it, the browser asks whether to open bundle, and bundle runs the same install as the terminal command, with the decisions in a window. So your designer, your PM, or the colleague who never opens a terminal can install your team's tools, and they still see who vouches for them. Safety: a link only ever names something published, an @handle/name or an at:// address, never a URL or a domain, so a web page can't make bundle fetch an arbitrary file. What it names is fetched, checked and reviewed like any install. bundle publish and bundle suite publish print the link for you, and the project's page lists every published app with its link. If links ever stop opening bundle, bundle links puts it right.
IV · What you can do now
$ bundle update
1 of 4 updated: tool
# a new terminal, the next morning:
tool: WARNING — scanner.example as malware has marked it bad since it was last checked
$ bundle installed tool
tool CHANGED the file is not the bytes that were installed
An install remembers how it was named, and asks again.
At shell start, and silent when there’s nothing to say.
Whoever touched the file on disk.
The part I like most: if a scanner flags something you installed last week, your next terminal tells you. You didn't subscribe to a mailing list or read a security advisory; the warning travelled to you, because it's an attestation about the exact hash you have. The shell check runs at most once a day, gives up quickly offline, and says nothing when there's nothing to say. bundle installed answers "is this still what I installed?" on any machine.
IV · What you can do now
$ bundle install @acme.com/devtools
* suite devtools expects its members to carry:
1 signed by …/acme/cli/…/release.yml@refs/heads/main — for cli
2 attested by published@did:plc:… — for cli-git, cli-k8s
accept which, for those members? all
suite devtools: 3 installed
# and IT pushes one rule to every laptop:
{ "require": { "attesters": ["permitted@did:web:it.acme.com"] } }
Every tool is still reviewed on its own.
Tools added are installed, tools dropped are removed.
Permit the suite, prohibit one tool in it.
Back to the ten laptops. A suite is a list of things that go together, like your team's toolset, published by whoever curates it. It doesn't vouch for anything itself: it says what each tool must carry, so you're asked once instead of ten times. bundle update keeps everyone on the same set. The company case: IT requires "permitted by us" of everything, permits a whole suite with one attestation, and can still prohibit one tool inside it. That's wish six: the same thing on every laptop and in CI.
IV · Back on the server
# /etc/bundle/policy.json
{ "require": { "attesters":
["published@did:plc:…"] } }
$ bundle install --system \
--name example-shop \
@you.example/shop
# each systemd unit:
example-shop run checkout
API, auth, workers, mail… each pinned by hash.
The servers only accept what that account attested.
Same bytes, same hash: not fetched, not restarted.
No half the services on last week’s release.
What’s on the server? One hash, and who vouched for it.
This closes the loop from the first slide. Picture a product made of many services. CI builds each service as a part, builds one app that pins every part's hash, and attests that one hash from its own Atmosphere account. The servers' policy only accepts that attestation, and it names a DID, never a handle, because handles change hands. Installed by name, the app is a command on the PATH, launcher included, so each systemd unit just runs example-shop run checkout: stock Node runs the app, which runs that one part. No unit points at a service's own archive. Archive members all carry a fixed date, so an unchanged part is the same bytes in the next release, keeps its hash, and its service isn't even restarted. Compare that with the deploy on slide two: no registry, no npm install, no copying files around, and a single answer to "what's running".
V · Why it matters
| Hard before | Now |
|---|---|
| What’s on the server? | One hash, and who vouched for it |
| Deploys that need the registry | The file is the release |
| Handing a colleague a CLI | One file that runs by name, or one click |
| Ten laptops in step | A suite, kept current by bundle update |
| Who vouches for it? | Signatures and attestations you choose |
| Hearing about a compromise | Your next terminal tells you |
| Plugins as loose npm packages | Signed plugins, installed per app |
The summary of the story, row by row: the server question from the opening, the deploy that reached for the internet, the tool for your team, the ten laptops, the stranger's tool. One row we didn't demo: if your app takes plugins, they can be signed bundles too, installed for your app, and a plugin called lodash can never replace your lodash, because your app's own dependencies always win. Don't read the table out; pick two rows that landed best with this room.
V · Why it matters
With a hash, on any server or laptop, months later.
One file, one click, kept current. No support channel.
See who vouches, and let your policy decide.
Built on Node itself: no new runtime, no new registry, no fork. You still develop with npm; this changes what you hand over.
Three takeaways, one per card; this is the slide people should remember. First, the question from the opening has an answer now. Second, sharing tooling stops being a support burden. Third, trust stops being an assumption you make about the registry and becomes something visible that you decide. And it doesn't ask you to switch runtimes or registries: it builds on features that are now in Node, and it doesn't replace npm; it's a way to ship what npm built.
V · Honestly
Node 26.11+ with --experimental-vfs. Both sides are experimental.
A signature says who built it. Review and attestations say the rest.
You still develop with npm. This changes what you hand over.
Before anyone goes and uses this for everything: three things it isn't. Being upfront here is what makes the rest credible. On "not proof of safety": most npm compromises shipped perfectly signed packages from real, hijacked accounts, which is exactly why attestations from other people exist.
Try it tonight
# get bundle (needs node 26.11.1+)
$ curl -LO https://github.com/pipobscure/bundles/releases/latest/download/bundle.nzip
$ node --experimental-vfs --vfs-load ./bundle.nzip install
# pack yours
$ BUNDLE_MANIFEST=app.manifest node --experimental-vfs -r @pipobscure/bundle/record --vfs-load=./app
$ bundle create --base ./app --files app.manifest --launcher --output app.unsigned.nzip
$ bundle sign app.unsigned.nzip && ./app.nzip
# share it, and vouch for it
$ bundle publish --as you.example --description 'my tool' app https://…/app.nzip
$ bundle attest --as you.example --kind audited app.nzip
Code & docs
github.com/pipobscure/bundles
Package
npm: @pipobscure/bundle
Say hi
@pipobscure.com
"If you ship a CLI, try packing it tonight. I'd love to hear where it breaks." The QR code in the corner opens bundle.pipobscure.com, the project's page, which lists every published app with its one-click link. The last two lines put it out there: publish gives it a name under your Atmosphere handle, pointing at your release URL, and attest records that you vouch for those exact bytes. The fourth line is the observe step: run the app once, the way it's normally used, and it writes down every file it reads. Likely questions: Native addons? Yes, loaded straight from the archive. Size? Only the files the app read; a small CLI is kilobytes. Do I need an Atmosphere account? No: install by URL or domain, sign with sigstore; accounts are only for publishing names and attestations. Windows? Yes, tested in CI, along with macOS. Isn't npm provenance enough? It's good, and it's about packages you install from npm; this is about the finished app you hand over. Bun or Deno? This builds on Node's own new features, so it's Node.
The timer turns orange when you are behind the planned pace for the current slide and green when you are ahead. Planned runtime is about 25 minutes.