Repository navigation
Conversation
…d tagged source (tools/verify-npm-release.mjs)
…d tagged source (tools/verify-npm-release.test.mjs)
…d tagged source (docs/verify-npm-release.md)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an independent verifier for npm package ↔ reviewed Git tag equivalence
The README currently warns that we do not provide tooling to verify whether the npm release matches GitHub. This PR provides such a tool without changing runtime code or how packages are published.
tools/verify-npm-release.mjsruns on a clean checkout of an independently reviewed exact release tag. It runsnpm pack --ignore-scriptsfor the local source and for the pinned registry version, then compares every packaged regular file by relative path and SHA-256. It fails on altered, missing, unexpected, duplicate, non-regular, or unsafe-path archive entries. The comparison streams members from tar without extracting untrusted archives or executing package lifecycle scripts. A separate--comparemode checks two offline tarballs.The README warning becomes a pointer to
docs/verify-npm-release.md, which explains how to use a separately audited copy of the verifier against older release tags that don't contain it and documents the trust limitations.Evidence
bitcoinjs/bitcoinjs-libtagv7.0.1, exact commitdc7f0673a8789afed0850ef4c49659d092c5b963, and compared itsnpm pack --ignore-scriptsoutput against the actual npm registrybitcoinjs-lib@7.0.1package. 93 source files = 93 published files, with zero missing, extra, or modified files.Boundaries
This does not indicate the npm registry release was compromised (v7.0.1 matched). It does not authenticate Git tag ownership/signatures, protect dependencies, or prove future publication provenance. It is an independent consumer-controlled equivalence check, complementary to reviewed release tags and attestation/Trusted Publishing. No package behavior, release process, wallet funds, or private keys were changed.
The verifier uses standard Node APIs plus
git,npm, andtar, with no new npm dependencies.