Skip to content

chore(core): remove unused extractJsBlocks to resolve CodeQL ReDoS alert - #2340

Merged
mbiernacik merged 1 commit into
mainfrom
remove-unused-extract-js-blocks
Sep 25, 2026
Merged

mbiernacik merged 1 commit into
mainfrom
remove-unused-extract-js-blocks

Conversation

@mbiernacik

@mbiernacik mbiernacik commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Resolves CodeQL alerts #10 and #11 (js/redos, CWE-1333): Inefficient regular expression leading to exponential backtracking in extractJsBlocks.

Details

  • extractJsBlocks was previously used only by legacy .sql compilation functions (compileTableSql, compileOperationSql, compileAssertionSql), which were removed in PR Deprecate support for old type .sql files #1564 (7c264505).
  • The function was orphaned, not exported in core/index.ts / @dataform/core, and is not referenced anywhere in the repository.
  • Rather than fixing regex backtracking on dead code, the unused function has been completely removed.

@mbiernacik
mbiernacik requested a review from a team as a code owner September 23, 2026 10:08
Comment thread core/compilers.ts Fixed
@mbiernacik
mbiernacik force-pushed the remove-unused-extract-js-blocks branch from 4c79ff7 to bffb2a7 Compare September 23, 2026 10:39
Comment thread core/compilers.ts
Comment thread core/compilers.ts Outdated
@mbiernacik
mbiernacik force-pushed the remove-unused-extract-js-blocks branch from bffb2a7 to 8db4ab6 Compare September 24, 2026 14:11
@rafal-hawrylak
rafal-hawrylak self-requested a review September 24, 2026 18:43
@mbiernacik
mbiernacik force-pushed the remove-unused-extract-js-blocks branch from 8db4ab6 to c559217 Compare September 25, 2026 08:30
@mbiernacik
mbiernacik merged commit b0cf8fb into main Sep 25, 2026
10 checks passed
@mbiernacik
mbiernacik deleted the remove-unused-extract-js-blocks branch September 25, 2026 08:41
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.

3 participants