Skip to content

Describe the malware sweep as it now runs in production - #1892

Merged
rdimitrov merged 1 commit into
mainfrom
rdimitrov-osv-malware-checks
Nov 22, 2026
Merged

rdimitrov merged 1 commit into
mainfrom
rdimitrov-osv-malware-checks

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

What

Documentation only: deploy/README.md, the "Malware sweep" section. It still described the sweep as off in production and untimed in a cluster.

  • Where it runs: staging and production.
  • Switching it on: now general guidance for a stack. In production imageTag must be 1.8.12 or later.
  • The daily run: the measured figures replace the estimate from the public listing. In production on 2026-11-22 it took just under three minutes and about 120 MiB for 281,000 server versions. In staging it added at most 0.18 CPU to the registry and 0.14 CPU to Postgres, averaged over a minute; in production the busiest registry pod briefly reached 0.7 CPU and no replica was added.
  • Alerts: the policies exist in both projects. The freshness policy counts only sweeps that finish after it was created, so on a new stack the alerts come first and a sweep by hand follows. Its email names no cluster in the subject. A command lists fired alerts without the email; it was run as written against production.

What merging will do

It deploys to staging, as every merge to main does. Nothing in staging changes beyond the rebuilt image. It does not deploy to production.

The sweep is on in production and has been timed there, so say so:
it took just under three minutes and about 120 MiB for 281,000 server
versions. Say that the freshness alert counts only sweeps that finish
after it was created, that its email names no cluster in the subject,
and how to list fired alerts without the email.

Co-authored-by: Copilot App <[email protected]>
@rdimitrov
rdimitrov merged commit f37ca84 into main Nov 22, 2026
9 checks passed
@rdimitrov
rdimitrov deleted the rdimitrov-osv-malware-checks branch November 22, 2026 10:28
rdimitrov added a commit that referenced this pull request Nov 22, 2026
Sets `mcp-registry:imageTag` to `1.8.13`. Nothing else in the stack file
changes.

## What production gets

v1.8.13 is `main` at 57332f3. Since v1.8.12:

- **#1895**: the daily malware sweep also asks npm, PyPI, NuGet and
crates.io whether each listed package still exists, and ends with one
JSON report line. The registry server itself is unchanged by it: the new
code runs only in the `registry-malware-sweep` CronJob.
- **#1893**: the three operational Grafana dashboards. This is `deploy/`
code already on `main`, so the production deploy applies it with this
PR.
- #1892 and #1894 touch documentation and the alert script only.

Both images exist: `ghcr.io/modelcontextprotocol/registry:1.8.13` and
`registry-usage-collector:1.8.13`.

## Measured on staging

Two hand-run sweeps of the same build on 2026-11-22, on a copy of
production's data (280,909 server versions, 23,945 distinct packages):

| | v1.8.12 sweep | this build |
|---|---|---|
| Duration | 2 min 54 s | 5 min 58 s and 5 min 51 s |
| Sweep pod, peak | about 120 MiB | 273m CPU, 124 MiB |
| Packages left unknown | n/a | 0 |

The extra three minutes are requests to the package registries; the
registry and Postgres see the same listing read as before. The report
arrived in Cloud Logging as `jsonPayload` (10 KB, inside one log line),
and the new alert fired with the report's summary attached.

## After this deploys

1. Run `tools/admin/configure-malware-alerts.py` for the production
project. Until a production sweep has written a report, it keeps the
current per-hit policy, so production is watched throughout.
2. The first sweep on this build is the next 03:40 UTC run, or one
started by hand.

## What to expect

The first report will list about 650 server versions (206 servers) that
point at a package that is gone, and send the warning email every day
until they are dealt with. That backlog is existing data, not something
this change causes.

## Rollback

Set `imageTag` back to `1.8.12`. The freshness and publish alerts work
with either build. If the alert script has by then removed the per-hit
policy, a v1.8.12 sweep that finds malware would send no email, because
it writes no report: check its log by hand, or roll forward again.

Co-authored-by: Copilot App <[email protected]>
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