Skip to content

Conversation

Copy link

Copilot AI commented Dec 2, 2025

PR App Fix RM-XYZ

🧰 Changes

Added inline documentation explaining ReDoS mitigations already implemented in the JSX preprocessing module. The original PR introduced four security fixes that eliminate catastrophic backtracking:

  1. HTMLBlock pattern (line 53) - Unrolling pattern (?:[^\]|\.)*` ensures each character has one match path
  2. Code block detection (line 70) - Replaced regex with indexOf() for O(n) string search
  3. Comment removal (line 106) - Negative lookahead (?!\/) eliminates asterisk ambiguity
  4. Attribute parsing (line 112) - Manual depth counter replaces nested quantifiers

No logic changes. Comments clarify security properties for maintainers.

🧬 QA & Testing

  • All tests passing (3/3 in preprocess-jsx-expressions.test.ts)
  • CodeQL scan: 0 vulnerabilities

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: maximilianfalco <97402501+maximilianfalco@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 2, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1108766/chrome-linux.zip
    • Triggering command: /usr/local/bin/node node install.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix ReDos in preprocessing by improving regex patterns docs: document ReDoS mitigations in JSX preprocessing Dec 2, 2025
Copilot AI requested a review from maximilianfalco December 2, 2025 13:56
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.

2 participants