Title: aggregator: /api/sw-probe accumulates unbounded in-memory script URLs · Issue #10539 · developing-today/code · GitHub
Open Graph Title: aggregator: /api/sw-probe accumulates unbounded in-memory script URLs · Issue #10539 · developing-today/code
X Title: aggregator: /api/sw-probe accumulates unbounded in-memory script URLs · Issue #10539 · developing-today/code
Description: Problem POST /api/sw-probe accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length. GET /api/sw-probe returns the full accu...
Open Graph Description: Problem POST /api/sw-probe accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length....
X Description: Problem POST /api/sw-probe accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length....
Opengraph URL: https://github.com/developing-today/code/issues/10539
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aggregator: /api/sw-probe accumulates unbounded in-memory script URLs","articleBody":"## Problem\n\n`POST /api/sw-probe` accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length. `GET /api/sw-probe` returns the full accumulated maps. The endpoint is unauthenticated.\n\n## Evidence\n\n- `pm-stack/aggregator/src/push.ts:110-123` — `recordSwProbe` appends any string from `report.registrations`/`report.evicted` into module-level `probe.foreignSeen` / `probe.evictedSeen` maps without bounds:\n - `if (typeof r === \"string\" && isForeignSwScript(r)) { probe.foreignSeen[r] = (probe.foreignSeen[r] ?? 0) + 1; }`\n - evicted strings are stored similarly with no foreign-script filter.\n- `pm-stack/aggregator/src/push.ts:126-133` — `swProbeSummary()` returns copies of both full maps, so response size grows with accumulated state.\n- `pm-stack/aggregator/src/server.ts:3409-3415` — `/api/sw-probe` POST reads a JSON body and records it with no authentication gate in that route; GET exposes the running summary.\n\nRequest bodies are bounded by `readJsonBody` (100KB), but repeated requests can add many distinct entries over time, growing memory and the GET payload without limit.\n\n## Why it matters\n\nUnbounded input-driven in-memory growth is a resource-exhaustion risk (memory/response bloat) for the long-lived aggregator process. Because the probe is observational, accumulation beyond what is useful provides no operational value.\n\n## Suggested fix shape\n\nBound the probe state: enforce a maximum number of tracked script URLs and/or maximum key length, drop/ignore entries beyond the cap (or keep only aggregate counts/top-N), and consider bounding the evicted map the same way. Optionally add lightweight input validation (e.g. only accept plausible URL/script-path strings) while keeping the endpoint fail-soft.","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-15T19:35:55Z","url":"https://github.com/developing-today/code/issues/10539"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1c1d8831-9788-bc29-eeec-84773277f088 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFE8:B03C5:2E2E76:3E0EC2:6B061833 |
| html-safe-nonce | 31a9bbc4097ea2309666ff7a947e1c5372cc9e91851f2ebf8fe6ad11533533ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkU4OkIwM0M1OjJFMkU3NjozRTBFQzI6NkIwNjE4MzMiLCJ2aXNpdG9yX2lkIjoiMjgwNDQyOTIyODc3NzgwNTg3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e68bd5ca6ddace8751d7ac23994efc39eb83ec1848917d311b399f319d98f5b |
| hovercard-subject-tag | issue:6408521190 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/10539/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd8f3409d039e83881b1c41e29353e6bf3c63ecf23383868c91b1a10edc3e8cc/developing-today/code/issues/10539 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd8f3409d039e83881b1c41e29353e6bf3c63ecf23383868c91b1a10edc3e8cc/developing-today/code/issues/10539 |
| og:image:alt | Problem POST /api/sw-probe accepts client-reported service-worker script URLs and stores every unique foreign/evicted URL string forever in process memory, with no cap on entry count or key length.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width