ReleaseLock learn

Does npm provenance mean a package is safe? What bee-js 13.3.0 showed

By Cassie Crossley · Published November 9, 2026 · Sources checked November 9, 2026 (PT)

No. @ethersphere/bee-js 13.3.0 was published to npm through the project's own trusted publishing workflow, carried valid provenance, and still ran attacker code on install. Provenance proves where and how a package was built. It does not prove the code it was built from is safe.

What happened

According to StepSecurity (all times UTC):

SafeDep reports that npm removed 13.3.0 at about 01:24 UTC, that the last clean version is 13.2.0, and that about 30 minutes after bee-js, bee-worker published Swarm Desktop 0.56.2 with the same loader.

What the malicious release did

The release changed package.json in two places: it moved node scripts/generate-version.cjs from prepare to postinstall, and it added the scripts directory to the files shipped in the package. Together, that made the script run on every consumer install (StepSecurity, SafeDep).

The script requests /v1/analytics from api.frameworkmetrics[.]xyz, sending X-Ethersphere: 1 and the operating system name as its User-Agent, then runs the response with access to Node's require and process. You did not have to import the library for this to run. StepSecurity found that the retrieved payloads look for Swarm Desktop wallet files (config.yaml and data-dir/keys/swarm.key) and try to install persistent access on Linux, macOS and Windows.

StepSecurity says its report does not establish how many wallets were exposed, whether funds were stolen, or how many systems installed 13.3.0. Projects such as @ethersphere/swarm-cli (^13.2.0) and @ethersphere/bee-dashboard (^13.0.0) used ranges that permit 13.3.0, but that does not mean every install received it.

What npm provenance actually attests

npm's docs say a provenance attestation publicly links a package to its source code and build instructions, so you can check where and how it was built. They also say plainly: when a package has provenance, "it does not guarantee the package has no malicious code." It gives you a verifiable link to audit (npm: generating provenance statements).

Trusted publishing lets npm accept publishes from a specific CI workflow you authorize, using short-lived OIDC credentials instead of long-lived npm tokens. When you publish this way from GitHub Actions or GitLab CI/CD, npm generates provenance automatically (npm: trusted publishing).

Why the green check still shipped malware

StepSecurity puts it directly: the package carries valid SLSA provenance linking it to the legitimate repository and workflow, because the malicious code was already in the source that workflow built. Nothing about the provenance was forged.

Controls that sit next to provenance

From npm's trusted publishing guidance:

From StepSecurity's response guidance:

In practice, treat the right to create a GitHub release like the right to publish to npm, because in this setup it was the same thing. That is the same lesson as stolen GitHub tokens: whoever holds release access holds your users' installs.

Where ReleaseLock fits, honestly

ReleaseLock tracks GitHub releases, not npm packages, and watches for releases that change after they are published. bee-js 13.3.0 was not a swap of an existing release. It was a brand new release built from malicious source, so a drift check would not have flagged it on its own. What ReleaseLock checks is a different layer: whether a release can be changed after the fact and whether its files still match what was first published.

Each layer answers one question. Provenance: was this built by the expected workflow? A workflow lockfile: which Action code ran in that workflow? Immutable releases: can the published files be replaced later? None of them answers whether the code is safe. The LiteLLM case showed a signed artifact built from the wrong source; Can this GitHub release be swapped? and 2026's release-swap incidents cover the after-publication layer. Closing risky triggers such as pull_request_target and pinning Actions after compromised tags are separate controls again.

To see a tool's release lock level, search the ReleaseLock directory.

A second case from the same week: wfx-loot used stolen GitHub credentials to push a CI secret stealer, and its npm hook ran without changing any workflow file.

Quick answers

Does valid npm provenance mean a package is safe?

No. npm says provenance does not guarantee a package has no malicious code. It gives a verifiable link to the source and build instructions so you can audit it. bee-js 13.3.0 had valid provenance and still ran malware on install.

How did bee-js 13.3.0 get valid provenance?

A GitHub release was published under the project's release bot identity, bee-worker. That started the project's real npm publishing workflow, which built the malicious commit and published it through trusted publishing, so npm generated provenance for it, according to StepSecurity.

What is the practical gate if provenance is not enough?

Who can create releases and approve publish jobs. SafeDep found that anyone who can create a release in the repository could publish to npm with provenance. npm suggests approval environments, tag protection rules and stage-only publishing that needs maintainer approval.

Should I disable npm lifecycle scripts?

Blocking lifecycle scripts stops this particular postinstall hook from running during install, according to StepSecurity. It does not undo an earlier execution, and it does not replace reviewing what you install.

Would ReleaseLock have caught bee-js 13.3.0?

Not on its own. ReleaseLock tracks GitHub releases and watches for releases that change after publication. bee-js 13.3.0 was a new release built from malicious source, not a swap of an existing one. Use the ReleaseLock directory for the after-publication layer.

Sources