Install packages.
Not threats.
ringfence runs npm install,
pnpm add, and friends
inside a lightweight
bwrap sandbox. Your SSH keys, cloud credentials, and
.env files stay yours. No
allowlists. No daemon. No config.
sudo required · One-line install · Open source (MIT) The TanStack supply-chain worm
In May 2026, a worm compromised 84 npm packages with valid SLSA Build Level 3 provenance. Postinstall scripts exfiltrated CI/CD secrets, SSH keys, cloud credentials, and crypto wallets. It spread undetected because it looked legitimate.
ringfence stops this class of attack at the OS level. Postinstall scripts run in a sandbox where your secrets simply do not exist.
Three layers of protection
From shell shim to kernel sandbox, nothing changes in your workflow.
Global shims
The one-line installer puts lightweight shims on your PATH. No aliases, no wrappers to remember.
When you run npm install, ringfence intercepts it automatically.
bwrap sandbox
The install runs inside a Bubblewrap container. Secrets in
~/.ssh, ~/.aws,
and your environment variables are invisible to postinstall scripts.
Zero config
Non-install commands pass through unchanged. No allowlists, no policy files, no daemon. Just sandboxed package management that works out of the box.
Works with every major package manager
Your existing commands. Same flags. Same output. Just sandboxed.
$ npm install express $ pnpm add zod $ yarn add react $ bun add @hono/hono One line. Any shell.
Works on Linux with bubblewrap and macOS with Docker.
$ curl -fsSL https://ringfence.pages.dev/install.sh | sh
Requires bubblewrap on Linux
or Docker on macOS.
The installer detects your OS and handles setup automatically.
What ringfence hides
Every install runs in a clean room. These never reach postinstall scripts.
- .env, .env.*
- .netrc, .pgpass
- credentials, secrets
- id_rsa*, id_ed25519*
- *.pem, *.key, *.crt
- known_hosts
- ~/.aws, ~/.azure
- service-account*.json
- gcloud-*.json
- *TOKEN*, *SECRET*
- *API_KEY*, *PASSWORD*
- AWS_, GITHUB_, NPM_
- *.pfx, *.p12, *.jks
- *.gpg, *.asc
- *.cer, *.keystore
- Replaced with tmpfs
- ~/.ssh, ~/.gnupg hidden
- Except ~/.npmrc, ~/.yarnrc
~/.npmrc and
~/.yarnrc are mounted
read-only so private registry auth still works. Everything else in
$HOME is invisible.