Repository navigation
Start every malware alert's email subject with the cluster's name - #1894
Merged
Merged
Conversation
Staging and production send their alerts to the same address. The default subject names the cluster late, where mail clients cut it off, and the freshness alert's named none: its condition has no resource, so it read "on __missing__". Set each policy's own subject line instead. Co-authored-by: Copilot App <[email protected]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tools/admin/configure-malware-alerts.pynow sets each policy's own email subject, starting with the cluster's name, for example[mcp-registry-prod] Registry malware sweep missing for 25 hours.Why
Staging and production send their alerts to the same address, and the default subjects did not tell them apart:
__missing__".deploy/README.mdis updated to match.Already applied
The script has been re-run against both projects. The three policies in each were updated in place, with the same ids, and the stored subjects were read back.
Not checked
No alert has fired since, so the new subject has not been seen in an email. A probe on staging did not produce one: the publish-match alert there is still open from this morning, and a further match does not open a second one.
What merging will do
It deploys to staging, as every merge to
maindoes. The script is not part of any deployment. It does not deploy to production.