Title: lab-ops-hub: public Worker has no auth on mutating, upload, AI and crawl endpoints (PR #436) · Issue #441 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: public Worker has no auth on mutating, upload, AI and crawl endpoints (PR #436) · Issue #441 · developing-today/code
X Title: lab-ops-hub: public Worker has no auth on mutating, upload, AI and crawl endpoints (PR #436) · Issue #441 · developing-today/code
Description: Finding PR #436 (#436, head a772fc2f391234cbdd4ed169d9174b13e8994801, initial commit 98381153702ef50135230e1d941040e4bbb4f4db) adds pkgs/lab-ops-hub, a Worker the PR body says is live at lab-ops-hub.developing-today.workers.dev. Its enti...
Open Graph Description: Finding PR #436 (#436, head a772fc2f391234cbdd4ed169d9174b13e8994801, initial commit 98381153702ef50135230e1d941040e4bbb4f4db) adds pkgs/lab-ops-hub, a Worker the PR body says is live at lab-ops-hu...
X Description: Finding PR #436 (#436, head a772fc2f391234cbdd4ed169d9174b13e8994801, initial commit 98381153702ef50135230e1d941040e4bbb4f4db) adds pkgs/lab-ops-hub, a Worker the PR body says is live at lab-ops-hu...
Opengraph URL: https://github.com/developing-today/code/issues/441
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: public Worker has no auth on mutating, upload, AI and crawl endpoints (PR #436)","articleBody":"## Finding\n\nPR #436 (https://github.com/developing-today/code/pull/436, head `a772fc2f391234cbdd4ed169d9174b13e8994801`, initial commit `98381153702ef50135230e1d941040e4bbb4f4db`) adds `pkgs/lab-ops-hub`, a Worker the PR body says is live at `lab-ops-hub.developing-today.workers.dev`. Its entire request dispatch in `pkgs/lab-ops-hub/src/index.ts` (the `fetch` handler starting ~line 123) routes on pathname + method only — there is no authentication or authorization check anywhere in the file (no `Authorization` header, shared-secret, or Cloudflare Access check; the only \"auth\" mention in the package is deployment-time `CLOUDFLARE_API_TOKEN` in the README).\n\nUnauthenticated callers can therefore use, among others:\n\n- `POST /api/machines` (src/index.ts:164), `POST /api/notes` (:178), `POST /api/tasks` (:206) — insert arbitrary rows into D1\n- `POST /api/notes/:id/summarize` (:186, `AI.run` at :190) — spend Workers AI neurons on demand\n- `POST /api/files` (:218, R2 `FILES.put` at :224) — upload arbitrary files to the `labops-files` R2 bucket, then read them back via `GET /api/files/\u003ckey>` (:232; keys are `uploads/\u003cepoch-ms>-\u003csanitised filename>`, i.e. largely predictable)\n- `POST /api/live` (:239) — overwrite/broadcast the Durable Object live board\n- `POST /api/crawl` (:246) — make the Worker (fallback `crawlFallback`, :112) and the container (`pkgs/lab-ops-hub/container/app.py:80`, `urllib.request.urlopen` on the caller-supplied URL, no scheme/host validation in either crawler) fetch an arbitrary URL, archive the result to R2, and burn container minutes\n\n## Why it matters\n\nThe demo's design premise (README: \"sized to stay inside the $5/mo plan's included amounts\") only holds for a single well-behaved user. On a public `workers.dev` URL, anyone can fill D1/R2, store arbitrary content in the bucket and serve it back, invoke AI and container runs until quotas/overage apply, and use the crawler as an open fetch proxy (SSRF surface in both implementations). This was verified against the PR head code — the package is not on `main` yet, so this is the moment to fix it before merge/redeploy.\n\nDeduped: issue searches for `lab-ops-hub`, `lab-ops`, `budget`, `unauthenticated` return no existing issue. Cross-repo: `lab-ops-hub` exists only in this repo/PR, so this is a single-repo issue.\n\n## Acceptance criteria\n\n- [ ] All mutating `/api/*` routes (and ideally all `/api/*` except `/api/health`) require a credential (e.g. a Worker secret compared in the handler, or Cloudflare Access in front of the app) — verified: an unauthenticated `POST /api/notes`, `POST /api/files`, `POST /api/crawl` each return 401/403, and the same calls with the credential succeed\n- [ ] Both crawlers validate the target URL: `http:`/`https:` only, and private / loopback / link-local targets refused (or an explicit, documented decision why not, in the README)\n- [ ] README's API section documents the auth requirement (the current \"Auth:\" note covers only deploy-time tokens)\n- [ ] OR, if a fully public demo is a deliberate decision: that decision and its abuse/cost exposure are recorded in the README, and the cost-incurring endpoints (crawl, summarize, file upload) are disabled by default\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-20T20:31:10Z","url":"https://github.com/developing-today/code/issues/441"}
| 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:f84fef71-5f82-f026-8e11-987d1aa24aea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D544:B03C5:5AB871:794F68:6B0626D3 |
| html-safe-nonce | d192c1e914477476628eedf30e9bb57b2eed8a50f7f29220548ed947161cde44 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTQ0OkIwM0M1OjVBQjg3MTo3OTRGNjg6NkIwNjI2RDMiLCJ2aXNpdG9yX2lkIjoiMjU4NDM4OTY2NjEzMjYwMDUzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 88abf411e09f87c7c0056483107eb74579ddbd74c829783ac09e3ec6c3a14d05 |
| hovercard-subject-tag | issue:5949164630 |
| 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/441/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a0012db62304980ce8d26d4a41129dcd45ddba27baad75f6257f57353a46d2e/developing-today/code/issues/441 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a0012db62304980ce8d26d4a41129dcd45ddba27baad75f6257f57353a46d2e/developing-today/code/issues/441 |
| og:image:alt | Finding PR #436 (#436, head a772fc2f391234cbdd4ed169d9174b13e8994801, initial commit 98381153702ef50135230e1d941040e4bbb4f4db) adds pkgs/lab-ops-hub, a Worker the PR body says is live at lab-ops-hu... |
| 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 | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| 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 | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| 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