Changelog

pnpm/pnpm · · 22 commits

pnpr lands audits, auth, and cache controls

Major pnpr work adds audit logging, tokens, npm audit/provenance support, metrics, rate limits, and cache eviction, plus a few stability fixes.

pnpr adds broad admin audit logging (zkochan1d90999)

Structured audit events now flow to pnpr::audit for user, team, rule, SCIM, and unpublish operations, with request metadata carried into JSON logs. This gives operators an auditable trail for destructive and administrative actions.

pnpr gains token creation, expiry, and read-only audit access (zkochan233af19)

The auth layer now supports creating tokens with read-only mode, CIDR restrictions, expiry, and names, while rejecting expired tokens during authentication and updating last_used_at on use. Read-only tokens can access npm audit endpoints but are blocked from token creation and other mutating writes.

pnpr now serves npm audit endpoints (zkochan8353638)

Support was added for bulk advisories and audit requests, including the quick audit path. When OSV data is configured, advisory queries are answered locally; otherwise pnpr proxies to upstream registries.

pnpr supports provenance attestations and keys (zkochan42b4aa1)

npm publish can now accept .sigstore provenance attachments, and pnpr serves /‑/npm/v1/attestations plus /‑/npm/v1/keys. It also rewrites attestation URLs through the registry and cleans up sigstore blobs when tarballs are unpublished.

pnpr exposes metrics, request IDs, and richer access logs (zkochan698893b)

A Prometheus metrics endpoint was added at /-/metrics and /metrics, along with request ID propagation and validation. Access logs now include request IDs and more request context, making tracing and production debugging easier.

pnpr adds rate limits, timeouts, and request coalescing (zkochanabc6099)

Package writes now verify permissions before buffering large request bodies, upstream packument fetches are coalesced, login endpoints are rate-limited, and requests can time out. This tightens protection under load and reduces wasted work.

pnpr adds cache eviction, retention limits, and orphan pruning (zkochan8e05737)

The upstream cache now has configurable size and age limits, automatic eviction, and startup pruning for orphaned namespaces. A new pnpr cache-gc command provides manual cleanup with dry-run and scoped pruning modes.

pnpr now accepts zstd-compressed upstream responses (bmaurerb260a31)

The registry client was updated to advertise and decode zstd responses in addition to gzip/deflate. This should especially help very large packuments where gzip’s window limits reuse.

pnpr hardens publish attachment handling (zkochan24563c0)

Publish requests now reject duplicate attachments that canonicalize to the same filename, preventing conflicting staging during journal commit. The orphan check path was also optimized.

pnpm updates network-policy modeling (KSXGitHub49230ac)

offline and preferOffline are now represented as an explicit three-state NetworkPolicy, centralizing precedence rules instead of recomputing them in many places. This is mostly an internal refactor, but it clarifies a subtle config interaction.

Other misc changes

  • Fixed invalid URL values in env-based config parsing.
  • Reduced macOS link/import work to a 4-thread pool for better APFS behavior.
  • Avoided stdout pipe aborts when the reader closes early.
  • Skipped pipeline run reports for empty dry-run selections.
  • Ported bundledDependencies tarball tests and cleaned up assorted docs, release notes, CI, and dependency bumps.