fix: replace .* regex with safer patterns (ReDoS)#265
Conversation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Status: PASS
|
Smoke Test Results (Run #21092103522)Last 2 Merged PRs:
Test Results:
Overall Status: FAIL cc: @Mossaka (author/assignee)
|
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Status: PASS
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall: PARTIAL PASS (3/4 tests passed) Note: Playwright browser download blocked. Used curl fallback for connectivity test. cc @Mossaka
|
The
.*patterns inwildcardToRegex()andparseUrlPatterns()could be vulnerable to catastrophic backtracking with crafted inputs.Changes
src/domain-patterns.ts: Replace.*with[a-zA-Z0-9.-]*for domain wildcards (RFC 1035 compliant characters only)src/ssl-bump.ts: Replace.*with[^\s]*for URL path wildcardsisDomainMatchedByPattern()Before/After
Tests updated to reflect new pattern format. All 550 tests pass.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.