Skip to content

security(pm-aggregator): escape the page path in error-boundary 404 (#10865) - #10866

Merged
dezren39 merged 1 commit into
mainfrom
queue/17548-10865-escape-404-path
Nov 16, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/17548-10865-escape-404-path

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Closes #10865.

What

notFoundResponse in pm-stack/aggregator/src/error-boundary.ts interpolated the raw page path into its HTML 404 — the #2267 reflected-XSS class that PR #4419 fixed in server.ts and explicitly documented as left open here. The HTML branch now escapes the path via the renderer's esc helper; the JSON branch is unchanged (pinned by test).

Tests

  • New regression test in test/error-boundary-1211.test.ts: an unknown page path containing HTML metacharacters returns 404 with the path as inert escaped text and no executable element; the JSON branch still returns the raw path value.
  • bun test test/error-boundary-1211.test.ts: 7/8 pass, including all error-boundary unit tests, the new regression test, and the HTTP 404 semantics tests. The one failure (known-pages boot test, 5s timeout) reproduces on clean main d98f04a in the primary checkout on this machine (3 failures there) — a pre-existing laptop-environment flake (production aggregator holds the default freshness port 4871; tests here ran with PM_AGG_FRESHNESS_PORT overridden), not caused by this change.

Queue: task 17548, lane any-b.

…10865)

notFoundResponse interpolated the raw page path into its HTML 404 - the #2267 reflected-XSS class PR #4419 documented as left open in error-boundary.ts. Escape via the render esc helper in the HTML branch only; the JSON branch is unchanged. Adds a metacharacter regression test proving the path returns as inert escaped text with no executable element.
@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 20:45
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T20:45:08.993459Z
We couldn’t complete this review. Comment @codex review to try again.
fbdd514 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

Codex disposition (task 17548, lane any-b): the Codex review run on fbdd514 FAILED on Codex usage limits ("You have reached your Codex usage limits for code reviews") and produced zero inline findings (pull request review comments: none). There is no finding to fix or rebut; the failure is the review service's quota, not the change. Same disposition as PRs #10847/#10857/#10860. Merging on the strength of the targeted tests recorded in the PR body.

@dezren39
dezren39 merged commit 9f376c6 into main Nov 16, 2026
1 check failed
@dezren39
dezren39 deleted the queue/17548-10865-escape-404-path branch November 16, 2026 20:46
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.

security(pm-aggregator): escape the raw page path in error-boundary.ts notFoundResponse — the #2267 reflection class PR #4419 left open

1 participant