Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/serhalp/npm.report. Audit, visualize, share, and track your npm org's trust signals. npm.report
Something went wrong. Try again.
Files
- TypeScript 66%
- Svelte 19%
- CSS 8%
- Shell 6%
- HTML <1%
- 1 more language <1%
README.md
npm supply-chain audit #
A browser app for auditing public npm organization packages for supply-chain trust and live publish access.
It answers:
- Package trust level: trust status of each in-scope package's
latestrelease. manual: versions published by non-bot accounts in the selected window.external: current package maintainers who are not listed as org members.- User publish history: versions a specific npm user personally published.
The TypeScript audit logic is a port of the original shell scripts in
scripts/. Those scripts are kept as the behavior reference.
Run Locally #
Requirements:
- Node.js 26+
- pnpm 11.9.0
pnpm install
pnpm run dev
Open http://localhost:5173.
Build and preview production output:
pnpm run build
pnpm run preview
pnpm run build transpiles with Vite; it does not type-check. Use
pnpm run typecheck when you need TypeScript validation.
Use The App #
- Enter up to five npm org slugs.
- By default, the audit scans all org packages. Select "Limit to recent packages" to use a recency window.
- Select package trust level,
manual,external, or any combination. Package trust level andmanualare selected by default. - For
manual, adjust bot or CI publisher account names to exclude. The default exclusion list starts withGitHub Actions. - For
external, runnpm org ls <org> --jsonlocally while authenticated and paste the output. npm package maintainers are public, but org membership is private, so the app needs your authenticated member list to compare them. - Run the audit. Results render as sortable tables with JSON copy and CSV download actions.
- The server saves each completed run automatically; copy its report link to share the read-only snapshot.
- For all-package package trust reports, select "Track daily" to append one automatic trust snapshot per day.
Architecture #
- Vite, Svelte 5, and TypeScript provide the static client. It submits audits to the server and renders the streamed progress and results.
- Audits run server-side in Netlify edge functions and stream to the browser
over SSE (
POST /api/audit-streamandPOST /api/user-publishes-stream). The browser does not compute the audit; because the server does, the saved report is authoritative. - npm is fetched directly from the server (
registry.npmjs.org,api.npmjs.org, andnpm.antfu.dev). There are no CORS proxies — the earlier browser-side proxies were removed. - Daily tracking reruns the all-package package trust report for opted-in org sets from an hourly Netlify scheduled background function.
- Report links and daily tracking are the only stateful features. The audit
stream saves the completed
AuditResultplus display metadata to Netlify Database as part of the run;/report/:idrenders that snapshot read-only. There is no browser-facing report-write endpoint.
Important Limits #
- npm's public org package endpoint caps results at 250 packages per org.
externalneeds fresh pasted membership output because org membership is private and can change.- "Manual" means the version's
_npmUserwas not in the configured bot list; npm does not distinguish a human login from that account's automation token. - Trust labels are delegated to
packumeta. - Scoped package download counts are intentionally fetched sequentially with a
500 ms delay because
api.npmjs.orgrate-limits aggressively. - Failed or exhausted fetches are counted and surfaced. A rate-limited package must not silently look clean.
Development Checks #
Useful commands:
pnpm run format:check
pnpm run lint
pnpm run typecheck
pnpm run test:unit
pnpm run knip
pnpm run test:a11y
pnpm run test
See CONTRIBUTING.md for contribution workflow and AGENTS.md for agent-facing
architecture rules.