Conversation
added 2 commits
June 30, 2026 19:31
…codebase The slugify idiom `.replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")` carries a polynomial-ReDoS in the trailing `-+$` (O(n²) backtracking on a long run of dashes not at end). CodeQL flagged the two sites reachable from uncontrolled input in capture-search-sources.mjs (js/polynomial-redos), but it's the same latent idiom in 15 sites across providers, tracker, profile, comms, research, interview, and a backfill script — fix the whole class. The preceding `[^a-z0-9]+→"-"` collapse already makes any boundary dash single, so `/^-|-$/g` is behavior-equivalent (verified on edge cases) and has no quantifier to backtrack (0.04ms on 50k dashes). Also dismissed the logo-src xss-through-dom (#8) as a false positive: the value is an https-validated, first-party logo.dev URL written into an img `src`, never reinterpreted as HTML.
Eliminates the slug-trim polynomial-ReDoS class (js/polynomial-redos) across 15 sites; dismisses the logo-src xss-through-dom false positive. main + dev now CodeQL-clean.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
biggest-littlest
approved these changes
Jun 30, 2026
biggest-littlest
left a comment
Member
There was a problem hiding this comment.
Code-owner approval. Slug-trim ReDoS class-fix (15 sites) + v0.5.2; xss-through-dom #8 dismissed as a verified false positive. structure-guards + CodeQL green, 0 open alerts on the merge ref, 939 tests.
ALARGECOMPANY
approved these changes
Jun 30, 2026
ALARGECOMPANY
left a comment
Member
There was a problem hiding this comment.
Second approval. Verified CodeQL clean on the merge ref and main baseline going to zero open alerts. Good to promote.
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.
Promotes the slug-trim polynomial-ReDoS class-fix (15 sites, js/polynomial-redos) + v0.5.2. With the logo-src xss-through-dom dismissed as a false positive, this brings main's CodeQL baseline to 0 open alerts. Merge-commit only. 939 tests green.