1
0
Fork 0
mirror of https://github.com/imjasonh/npm-snoop synced 2026-07-08 09:05:08 +00:00
Commit graph

5 commits

Author SHA1 Message Date
76af9702ce Add ast-diff CLI for diffing symbols between npm package versions
Uses tree-sitter to parse JS/TS files and extract top-level symbols
(functions, classes, variables, methods), then diffs them by content
hash to identify added/removed/modified symbols between two versions.
Intended to help correlate CVE fixes with specific changed functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:52:19 -04:00
a5eda95590 Fix queries.md: use REGEXP_EXTRACT for dist-tags, add WHERE body IS NOT NULL
BigQuery's JSONPath doesn't support hyphenated keys like "dist-tags".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:23:54 -04:00
50185584e0 Record per-version releases, metadata modifications, and raw JSON bodies
- Emit one release event per version published (not per package), using
  the metadata time map to find versions published since last poll
- Add modification events for metadata-only changes (dist-tag moves,
  maintainer updates, etc.) with full raw JSON body for diffing
- Include raw package metadata (versions key stripped) in release and
  modification events for later analysis
- Store poll state as JSON (seq + timestamp) instead of plain seq
- Switch recorder to method=gcs (Pub/Sub writes directly to GCS,
  eliminating the recorder Cloud Run service)
- Add queries.md with example BQ queries including a window-function
  diff query for tracking metadata changes over time

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:21:58 -04:00
c47f7dc39b Add cron job monitoring dashboard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:20:38 -04:00
a22a473782 Poll npm registry changes feed and record releases to BigQuery
Go cron job that tails the npm CouchDB _changes feed, fetches package
metadata, and emits CloudEvents for releases and deletions. Events flow
through a Chainguard cloudevent-broker to a cloudevent-recorder that
streams them into BigQuery.

Infrastructure is managed with Terraform using chainguard-dev/terraform-
infra-common modules for networking, broker, recorder, and cron.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:03:29 -04:00