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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@freedomofpress/sigstore-browser

v0.1.10

Published

A minimal browser-only Sigstore verification library.

Downloads

1,309

Readme

Minimal Browser-Compatible Implementation of a Sigstore Verifier

Conformance

A minimal TypeScript implementation of Sigstore verification, optimized for browser compatibility.

This is a browser-compatible alternative to sigstore-js that focuses on verification functionality needed for secure software updates in browser environments.

[!CAUTION] This library has not received an independent security audit. Maintenance is performed by volunteers, and the project is not officially supported or endorsed by the Freedom of the Press Foundation.

Features

  • Full Sigstore Verification: Complete verification of Sigstore bundles including certificate chains, transparency logs, and timestamps
  • Browser-First: Designed for web browsers using the Web Crypto API
  • TUF Integration: Secure trusted root updates via The Update Framework
  • Policy Verification: Flexible identity and claim verification adapted from sigstore-python
  • Multiple Bundle Formats: Supports Sigstore bundle versions 0.1, 0.2, and 0.3
  • Multiple Key Types: RSA, ECDSA, and Ed25519 signature verification via Web Crypto API
  • Minimal Dependencies: Only depends on @freedomofpress/crypto-browser, @freedomofpress/tuf-browser, and @noble/curves

Installation

npm install @freedomofpress/sigstore-browser

Usage

Basic Verification

import { SigstoreVerifier } from '@freedomofpress/sigstore-browser';

// Initialize the verifier
const verifier = new SigstoreVerifier();

// Load the Sigstore trusted root via TUF (recommended)
await verifier.loadSigstoreRootWithTUF();

// Or load a trusted root directly
// await verifier.loadSigstoreRoot(trustedRootJson);

// Verify an artifact
const bundle = JSON.parse(bundleJsonString);
const artifactData = new Uint8Array(/* artifact bytes */);

const verified = await verifier.verifyArtifact(
  '[email protected]',           // Expected signer identity (SAN)
  'https://accounts.google.com',    // Expected OIDC issuer
  bundle,
  artifactData
);

Verification Options

const verifier = new SigstoreVerifier({
  tlogThreshold: 1,   // Minimum transparency log entries required (default: 1)
  ctlogThreshold: 1,  // Minimum SCTs required (default: 1)
  tsaThreshold: 0,    // Minimum TSA timestamps required (default: 0)
});

What Gets Verified

The verifyArtifact method performs the following checks:

  1. Identity Verification: Certificate SAN matches the expected identity
  2. Issuer Verification: Certificate OIDC issuer matches the expected issuer
  3. Certificate Chain: Leaf certificate chains to a trusted Fulcio CA
  4. SCT Verification: Signed Certificate Timestamps from CT logs
  5. Inclusion Promise/Proof: Rekor transparency log inclusion
  6. Merkle Tree Verification: Inclusion proof validation (for v0.2+ bundles)
  7. TLog Body Verification: Entry body matches bundle content
  8. TSA Timestamp Verification: RFC 3161 timestamp verification (if configured)
  9. Signature Verification: Artifact signature using certificate's public key

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run tests (browser environment via Playwright)
npm test

# Lint and format
npm run lint

Related Projects

This library is part of a family of browser-compatible security libraries:

License

Apache License 2.0 - see LICENSE file for details. Portions of this package incorporate code from sigstore-js and sigstore-python.

Acknowledgments

This project is based on the Sigstore specification and adapted from: