Skip to content

feat: maintainer/publisher signals (v0.5.0)#5

Merged
pkuzco merged 1 commit into
mainfrom
feat/maintainer-signals
May 27, 2026
Merged

feat: maintainer/publisher signals (v0.5.0)#5
pkuzco merged 1 commit into
mainfrom
feat/maintainer-signals

Conversation

@pkuzco

@pkuzco pkuzco commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a checker that pulls the npm packument and emits two signals when takeover patterns are visible in the publish history.

  • new-publisher (medium) — the latest release was published by an account that did not publish any of the first three releases, and the package is older than 180 days. Mirrors the event-stream 2018 attack pattern: long-running package, sudden new face on the most recent publish.
  • sole-maintainer (low) — only one maintainer registered on the package. Informational bus-factor signal, not a vulnerability.

Both can fire from a single packument fetch. The check is npm-only for now; PyPI's JSON API doesn't expose comparable per-version uploader history.

  • New MaintainerSignal type
  • --no-maintainer CLI flag + matching no-maintainer action input
  • 10 new tests; bumps version to 0.5.0

Smoke test

Real-world validation against the historically-compromised event-stream package:

event-stream  4.0.1   medium   new publisher  sole maintainer
express       4.18.2  —        —

ossrisk now detects the exact pattern that the 2018 attack exhibited.

Test plan

  • npm test — 10 new tests, 101 total, all green
  • npm run build — clean
  • Smoke-tested against event-stream@4.0.1 (both signals fire) and express@4.18.2 (clean)
  • CI runs against this branch

🤖 Generated with Claude Code

Adds a checker that pulls the npm packument and emits two signals when
takeover patterns are visible in the publish history.

- new-publisher (medium): the latest release was published by an account
  that did not publish any of the first three releases, and the package
  is older than 180 days. Mirrors the event-stream 2018 attack pattern.
- sole-maintainer (low): only one maintainer is registered — informational
  bus-factor signal, not a vulnerability.

The check is npm-only for now; PyPI's JSON API does not expose
comparable per-version uploader history, so a future iteration would
need a different data source for that ecosystem.

- New MaintainerSignal type (two patterns, two risk levels)
- --no-maintainer CLI flag and matching action input
- 10 new tests; bumps version to 0.5.0

Smoke-verified end-to-end against event-stream@4.0.1 (flags both
new-publisher and sole-maintainer → medium) versus express@4.18.2
(consistent publishing history, multiple maintainers → clean).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@pkuzco pkuzco merged commit 8229968 into main May 27, 2026
2 checks passed
@pkuzco pkuzco deleted the feat/maintainer-signals branch May 27, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant