Does npm provenance mean a package is safe? What bee-js 13.3.0 showed
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):
- November 8, 23:59:54: an unsigned commit,
de2f74e784b2eafa0d66fbb6d88b42ea11ee34cf, appeared under the project's release bot identity,bee-worker. Its title,chore(upcoming): release 13.3.0, followed the project's normal release naming. - The normal release pull request for 13.3.0, #1288, was still open and unmerged. The previous release, 13.2.0, had gone through a signed, merged release pull request.
- November 9, 00:06:01: the
v13.3.0GitHub release was published underbee-worker. That started the repository's existing npm publishing workflow. - November 9, 00:09:50:
@ethersphere/bee-js@13.3.0was published to npm using GitHub Actions trusted publishing.
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.
- Provenance proves the build path, not the review. Trusted publishing confirms which workflow published. It does not show that a person reviewed the commit that workflow built.
- Release creation was the real gate. SafeDep found the publish workflow ran on a published release and runs tests only for code pushed to a branch, so it ran none here. In SafeDep's words: "Anyone who can create a release in this repository can publish code to npm with provenance."
- The credential is unknown. StepSecurity says the evidence points to misuse of the
bee-workeridentity, likely a stolen account credential or token, but does not establish which credential or how it was obtained.
Controls that sit next to provenance
From npm's trusted publishing guidance:
- Use deployment environments to add approval requirements to the publish job.
- Enable tag protection rules to control who can create release tags.
- Consider stage-only permissions, so CI can only stage a package and a maintainer must approve it with 2FA before it goes public.
- After setting up trusted publishing, restrict token-based publishing and revoke tokens you no longer need.
From StepSecurity's response guidance:
- Check lockfiles, installed dependency metadata and CI install logs for
@ethersphere/bee-js@13.3.0, including as a transitive dependency. - If it was installed with lifecycle scripts enabled, treat the system as potentially compromised. Removing the package does not remove persistence the payload may have installed.
- Rotate credentials from a clean environment, and pin a reviewed release. StepSecurity says the examined 13.2.0 does not contain this hook.
- Blocking lifecycle scripts stops this particular hook from running during install, but does not undo an earlier execution.
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.