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

@happyhackingspace/scorecard

v0.2.0

Published

Reference implementation of OSSF Scorecard in TypeScript

Readme

@happyhackingspace/scorecard

Reference implementation of OSSF Scorecard in TypeScript.

Computes all 20 OSSF Scorecard checks via the GitHub API directly, without depending on the OSSF public API (which only covers ~1M repos).

Install

bun add @happyhackingspace/scorecard
# or
npm install @happyhackingspace/scorecard

Usage

import { computeScorecard } from "@happyhackingspace/scorecard";

const result = await computeScorecard("owner", "repo", {
  token: "ghp_...",
});
// → { score: 7.6, date: "2026-03-03", repo: "owner/repo", checks: [...] }

Run specific checks

const result = await computeScorecard("owner", "repo", {
  token: "ghp_...",
  checks: ["Maintained", "License"],
});

Custom fetch

const result = await computeScorecard("owner", "repo", {
  token: "ghp_...",
  fetch: customFetch,
});

API

computeScorecard(owner, repo, options)

Returns Promise<ScorecardResult>.

Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | token | string | Yes | GitHub personal access token | | checks | string[] | No | Run only specific checks | | fetch | typeof fetch | No | Custom fetch implementation |

Result

interface ScorecardResult {
  date: string;
  repo: string;
  score: number;
  checks: ScorecardCheck[];
}

interface ScorecardCheck {
  name: string;
  score: number;     // 0-10, or -1 (inconclusive)
  reason: string;
  details?: string[];
}

Checks

| Check | Risk | Weight | Description | |-------|------|--------|-------------| | Maintained | High | 7.5 | Recent commit and issue activity | | Dependency-Update-Tool | High | 7.5 | Dependabot or Renovate configured | | Binary-Artifacts | High | 7.5 | No binary files in repository | | Branch-Protection | High | 7.5 | Branch protection rules enabled | | CI-Tests | Low | 2.5 | CI checks on recent commits | | CII-Best-Practices | Low | 2.5 | CII Best Practices badge level | | Code-Review | High | 7.5 | Changes reviewed before merge | | Contributors | Low | 2.5 | Multi-org contributor diversity | | Fuzzing | Medium | 5 | Fuzzing infrastructure detected | | Packaging | Medium | 5 | Publishing workflows present | | Pinned-Dependencies | Medium | 5 | Dependencies pinned to SHA | | SAST | Medium | 5 | Static analysis tools configured | | SBOM | Medium | 5 | Software bill of materials present | | Security-Policy | Medium | 5 | SECURITY.md with disclosure info | | Signed-Releases | High | 7.5 | Release signatures or SLSA provenance | | Token-Permissions | High | 7.5 | Least-privilege workflow permissions | | Vulnerabilities | High | 7.5 | Open vulnerability alert count | | Dangerous-Workflow | Critical | 10 | No script injection or unsafe triggers | | License | Low | 2.5 | OSI-approved license present | | Webhooks | Critical | 10 | Webhook secrets configured |

Scoring

Aggregate score uses the exact OSSF formula:

score = Σ(weight × check_score) / Σ(weight)

Weights: Critical=10, High=7.5, Medium=5, Low=2.5. Inconclusive checks (score=-1) are excluded.

Development

bun install
bun run test
bun run build
bun run lint
bun run typecheck

License

MIT