Title: security(aggregator): comment githubUrl is stored unvalidated and rendered as a link href — a javascript: URL reaches the dashboard · Issue #950 · developing-today/code · GitHub
Open Graph Title: security(aggregator): comment githubUrl is stored unvalidated and rendered as a link href — a javascript: URL reaches the dashboard · Issue #950 · developing-today/code
X Title: security(aggregator): comment githubUrl is stored unvalidated and rendered as a link href — a javascript: URL reaches the dashboard · Issue #950 · developing-today/code
Description: Finding The dashboard comments flow stores a caller-supplied githubUrl with no validation and later renders it as a link href. HTML escaping prevents attribute breakout but not dangerous schemes: a stored javascript: or data: URL becomes...
Open Graph Description: Finding The dashboard comments flow stores a caller-supplied githubUrl with no validation and later renders it as a link href. HTML escaping prevents attribute breakout but not dangerous schemes: a...
X Description: Finding The dashboard comments flow stores a caller-supplied githubUrl with no validation and later renders it as a link href. HTML escaping prevents attribute breakout but not dangerous schemes: a...
Opengraph URL: https://github.com/developing-today/code/issues/950
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"security(aggregator): comment githubUrl is stored unvalidated and rendered as a link href — a javascript: URL reaches the dashboard","articleBody":"## Finding\n\nThe dashboard comments flow stores a caller-supplied `githubUrl` with no validation and later renders it as a link `href`. HTML escaping prevents attribute breakout but not dangerous schemes: a stored `javascript:` or `data:` URL becomes a clickable script link in the dashboard.\n\n## Evidence (PR #920, merge `12620917dd5f`, current main `a2eef6f7920a`)\n\n- `pm-stack/aggregator/src/server.ts:150-156`: `POST /api/comments/github-result` accepts `url: typeof body.url === \"string\" ? body.url : undefined` — any string, no pattern check.\n- `pm-stack/aggregator/src/comments.ts:173-179`: `CommentsStore.markGithubResult` stores it verbatim (`c.githubUrl = result.url`); no validation exists anywhere in `comments.ts`.\n- `pm-stack/aggregator/src/render.ts:231`: renders `\u003ca href=\"${esc(c.githubUrl)}\">view\u003c/a>`. `esc()` escapes `&\u003c>\"'` (attribute breakout is blocked) but passes a `javascript:` scheme through unchanged.\n\n## Why it matters\n\nThe comments API is unauthenticated by design (loopback + tailnet trust model, per the `comments.ts` header comment), so anything that can POST to it — a compromised tailnet peer, a stray script, another agent run — can plant a script-scheme link in a dashboard the maintainer clicks during triage. Low severity because of that trust model and because the click is required, but the fix is one allowlist check at the single write path.\n\n## Acceptance criteria\n\n- `markGithubResult` (or the endpoint) rejects any `url` not matching `^https://github\\.com/`.\n- A test posts a `javascript:` URL to the github-result flow and asserts rejection (no stored `githubUrl`).\n- The existing flow — a real `https://github.com/…` result URL is recorded and rendered as the \"view\" link — still works.\n\nFound by the pr-diff-review job reviewing PR #920 against current main. Dedupe: searches for `githubUrl` / `github-result URL validation` / `dashboard comment href javascript` returned no existing issue (only the closed parent implementation issue #906).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-26T04:48:22Z","url":"https://github.com/developing-today/code/issues/950"}
| 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:c355046d-87ec-82c4-f768-274da0025da7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1D2:1759AA:4102A7:57AD66:6B061EC3 |
| html-safe-nonce | 7226928375db9eaef5f73f67b411a0f835220de41d5861ee64b49a568c206c3f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUQyOjE3NTlBQTo0MTAyQTc6NTdBRDY2OjZCMDYxRUMzIiwidmlzaXRvcl9pZCI6IjMzNjE3MTkzNDMwMTU5Mjc0OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c3e799b876c2355adfb5d936232f7e758d994f907be0bcd6575317512e7aba10 |
| hovercard-subject-tag | issue:6033542597 |
| 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/950/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd92b717eeabc5e61301b078a2d2af4b652c7f3cbe01ea8c651f5be4f2e8f076/developing-today/code/issues/950 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd92b717eeabc5e61301b078a2d2af4b652c7f3cbe01ea8c651f5be4f2e8f076/developing-today/code/issues/950 |
| og:image:alt | Finding The dashboard comments flow stores a caller-supplied githubUrl with no validation and later renders it as a link href. HTML escaping prevents attribute breakout but not dangerous schemes: a... |
| 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 | 9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d |
| 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 | b25c3080e84402f75431d8dc7a96b2635219cec7 |
| 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