Repository navigation
fix(cli): use jsonc-parser to parse wrangler.jsonc - #58
Merged
Brooooooklyn merged 1 commit intoApr 1, 2026
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 117d864db1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Brooooooklyn
force-pushed
the
04-01-fix_cli_use_jsonc-parser_to_parse_wrangler.jsonc
branch
from
April 1, 2026 07:37
117d864 to
d99eed3
Compare
Brooooooklyn
deleted the
04-01-fix_cli_use_jsonc-parser_to_parse_wrangler.jsonc
branch
April 1, 2026 08:09
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
The admin log viewer rendered entry.url, entry.method, entry.status, and entry.outcome via innerHTML without escaping. Since entry.url comes from user worker request URLs, an attacker could send crafted requests to a deployed worker to inject HTML/JS that executes when an admin views the deployment logs. Apply escapeHtml to all user-derived fields, matching the existing treatment of log messages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low functional risk (string escaping in an admin-only view), but it addresses a potentially serious XSS injection vector from user-controlled log/request fields. > > **Overview** > Prevents HTML/JS injection in the admin deployment log viewer by escaping additional user-controlled fields before writing to `innerHTML`. > > Specifically applies `escapeHtml` to `entry.method`, `entry.url`, `entry.status`, `entry.outcome`, and the load failure `err.message`, aligning these with the existing escaping used for log messages/exceptions. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f2983095c152da77a2d551a8d54aced76ac318f3. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.

Note
Medium Risk
Changes how
wrangler.jsonc/wrangler.jsonis parsed duringinitand deploy/binding sync flows; parsing behavior differences could affect projects with edge-case config syntax.Overview
Switches the CLI’s
wrangler.jsonchandling to use thejsonc-parserlibrary instead of ad-hoc comment-stripping/custom parsing.This updates both
init’ssetupWranglerConfigandwrangler.ts’sparseJsonc(used byreadWranglerCompat,syncWranglerBindings, andensureWranglerNodejsAlsFlag) to parse JSONC with error reporting and to fail fast on parse errors. Addsjsonc-parser@3.3.1tovoiddependencies and lockfile.Written by Cursor Bugbot for commit d99eed3. This will update automatically on new commits. Configure here.