npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cloudhal/release-verify

v0.13.0

Published

Verifies a Cloudhal release bundle (RFC-0046 §2, §7, §11a): the Ed25519 release statement against pinned keys, the manifest, and every part of the tarball. Worker-safe; the attestation check is a Node-only subpath.

Readme

@cloudhal/release-verify

Verifies a Cloudhal release bundle before you deploy it. It follows RFC-0046 §2, §7 and §11a: hosts, tools and the cloudhal CLI share this one verifier. It runs on Workers, Node 24 and browsers.

import { releaseAssetUrls, verifyRelease } from "@cloudhal/release-verify";

const release = await verifyRelease({
  request: { version: "0.9.0" },             // what you asked for: a signed older release is refused
  statement, signature, manifest,            // the exact downloaded bytes (Uint8Array)
  tarball: () => fetchTarballStream(),       // opened twice: digest first, then entries
  planVersion: 1,                            // the highest plan version your deployer supports
});
for await (const entry of release.entries()) {
  // { worker, kind, path, type?, bytes }: verified against the signed manifest
}
// Activate the deployment only after the loop has finished without an error.

What it checks

  1. Sizes. The statement is at most 4096 bytes, and the signature is exactly 64.
  2. Signature. Ed25519 over the exact statement bytes, with a trusted key for signing.keyId.
  3. Request. The statement is for the requested version and channel.
  4. Statement. Its schema, through the precompiled validator, plus RFC-0046 §2 invariants 1 to 3 and 6.
  5. Manifest.
    • Its size and SHA-256 equal the statement's.
    • Its schema and invariants 4 and 5.
    • The release-statement.sig signature form.
    • planVersion.
    • Every listed path, and §7's limits.
  6. Tarball. Its size and SHA-256 equal the statement's.

Then entries() re-reads the tarball. It refuses:

  • an entry the manifest does not list, or one whose size or SHA-256 differs from its listing;
  • a missing entry;
  • anything outside §7's tar format;
  • an unsafe path: .., ., an empty segment, a backslash, a control character, more than 512 bytes, or two paths that collide after case folding.

There is no soft-fail mode. Every refusal is a ReleaseVerifyError with a stable code (ERROR_CODES).

Keys

PINNED_KEYS holds the keys of docs/security/release-signing-keys.md as they were when this version was published. It cannot learn about later revocations by itself.

You can only reduce trust: pass revoked: ["<keyId>"] to withdraw a key. Passing your own keys map replaces the table, so treat that as a reviewed change.

Key list and yank list (RFC-0046 §9)

keys.json (signed by an offline root) and yanked.json (signed by a yank key) live at https://cloudhal.dev/.well-known/cloudhal/, each with its .sig. Fetch all four on every run, verify them, and merge them into the keys you pin. They can only take trust away:

import { mergeTrust, PINNED_KEYS, verifyKeys, verifyRelease, verifyYanked } from "@cloudhal/release-verify";

const keys = await verifyKeys({ document: keysJson, signature: keysSig });            // pinned root, fresh
const yanked = await verifyYanked({ document: yankedJson, signature: yankedSig, keys }); // stale → stale-yank-list
await verifyRelease({ ...input, keys: mergeTrust(PINNED_KEYS, { keys, yanked }), yanked });
  • Expiry. A statement's createdAt must lie within its key's [notBefore, notAfter]. After notAfter, the key verifies only while a fresh keys.json lists it as retiring. With pinned keys alone, the release is refused with key-expired.

  • Yanking. A yanked version is refused (yanked), and a key that yanked.json revokes is refused (key-revoked).

  • Keep state if you can. Pass the memory you stored to verifyKeys and verifyYanked, and store rememberYanks(yanked, keys, memory) after every accepted pair. Refused:

    • a list that goes back in serial, or drops a version or key you have already seen yanked or revoked (stale-yank-list);
    • a keys.json older than the newest one you have seen (key-list-invalid), so a replayed list cannot bring back a revoked yank key;
    • a list signed by a yank key a root list revoked or replaced (yank-list-invalid);
    • a list from another yank key, unless a newer keys.json replaces the remembered one (stale-yank-list).

    Without memory, a stolen yank key could undo yanks for you until the root rotates it. A keys.json lists at most one active yank key.

  • Not yet published. PINNED_ROOTS is empty until the root is generated. Until then verifyKeys refuses every list, unless you pass roots.

The second factor

The Node-only subpath @cloudhal/release-verify/attestation checks the GitHub build-provenance attestation of the tarball, the manifest and the statement. It needs gh 2.68.0 or newer, signed in. It returns verified or failed, or unavailable when gh is missing, too old, or signed out.

import { verifyAttestation } from "@cloudhal/release-verify/attestation";
const r = await verifyAttestation({ dir, version: "0.9.0", commit: release.statement.commit });

Scopes

missingScopes(manifest, granted) compares Cloudflare scope ids exactly, with one exception: workers-scripts.admin covers workers-scripts.edit, which manifests up to v0.9.0 name (RFC-0046 §3).