Dependency guards
OmarchymacOS
Every package the machine downloads passes three checks first, set only through each tool’s own settings: no proxy, no shell alias and no wrapper script, so bun run, bun test and python3 cost nothing extra.
The three checks
7-day cooldown | A version is installed only once it is 7 days old. Hijacked releases are usually found and pulled within hours, so they never arrive. |
|---|---|
Socket scanner | Socket’s own scanner for Bun checks every package against known malware before it is downloaded, in Bun and in the npm: tools mise installs. With Socket out of reach, the install stops. |
No install scripts | A dependency’s postinstall runs only when it was approved. Bun, pnpm and mise already work that way; npm is made strict. |
When the scanner stops an install
Bun resolves the whole dependency tree, then hands every package and version to the scanner before it downloads anything. The scanner asks Socket about each one and answers with an advisory for each package Socket flags. A fatal advisory stops the install with a non-zero exit, and package.json, the lockfile and node_modules stay as they were. A warn asks whether to go on in a terminal, and stops in CI. Known malware comes back fatal.
FATAL: pkg:npm/[email protected] | The package and version flagged. It can be a dependency deep in the tree: bun why <name> shows who pulls it in. |
|---|---|
Package has been removed from the npm registry due to security concerns. | What Socket found, in its own words. |
Fix: Remove this package… | Socket’s advice for it. |
https://socket.dev/npm/package/… | Socket’s page for that version, with the alerts and the code it found. |
1 advisory (1 fatal) | Then: Installation aborted due to fatal security advisories. |
⚠ Socket Security Scanner free mode | Only says no Socket token is set. Free mode still blocks known malware. |
aube install failed: refusing to install package(s) flagged by securityScanner | The same block from mise, for an npm: tool, followed by the same package, text and link. |
Read the Socket page. If the package is malware, drop it; if it came in as a dependency, update or replace the package that pulls it in.
If the alert is about one version only, pin a version Socket does not flag.
If you are sure it is a false positive, turn the scanner off for that one install, as for offline work, and back on right after.
“Security scanner failed” is different: the scanner could not reach Socket, so nothing was checked, and the install stopped anyway.
Where each one is set
~/.config/.bunfig.toml | Bun and bunx: minimumReleaseAge and the scanner. |
|---|---|
~/.config/aube/config.toml | The npm client mise uses for npm: tools: the same scanner. |
mise settings | minimum_release_age for every tool, and provenance checked on every install. |
~/.config/uv/uv.toml | uv: exclude-newer, 7 days. |
npm config · pnpm config | npm and pnpm, for third-party projects that use them: the cooldown, and npm refuses unapproved scripts and git or tarball dependencies. |
PIP_REQUIRE_VIRTUALENV | pip, in those projects, only installs inside a virtualenv. |
agent settings | Claude Code, Codex, Copilot, Gemini, opencode and Grok don’t update themselves: they change only through mise, after the cooldown. |
Bun for JavaScript and uv for Python. The others are set up for projects that bring them.
What it costs
bun run · bun test · python3 | Nothing. |
|---|---|
bun install | About 0.3 s more, for the scanner. |
mise npm: tool | About 2 s more per install. |
When it gets in the way
- To check it: in an empty folder, bun add safe-chain-test must stop with a Socket advisory. That package is a test flagged as malware.
- Offline: comment out the [install.security] lines in the bunfig, or set securityScanner = "" for mise. The cooldown stays.
- An urgent fix younger than 7 days: exempt only that package, in the setting of the tool it comes through.
- Go modules have no cooldown to set, so they keep only Go’s checksum database.