Skip to content
Draft
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
232258d
Initial plan
Copilot Jul 15, 2026
a27142d
Add C++ regex parser and RegexTreeView (Phase 1)
Copilot Jul 15, 2026
239ac44
Fix change note category to 'minorAnalysis'
Copilot Jul 15, 2026
f72bad7
Add C++ regex flow modeling and construction-site flags (Phase 2)
Copilot Jul 16, 2026
84d7a2b
Add cpp/polynomial-redos query (Phase 3)
Copilot Jul 16, 2026
47969ae
Add cpp/redos exponential ReDoS query (Phase 4)
Copilot Jul 16, 2026
d6c76aa
Fix cpp/redos test: swap non-exponential (a|ab)* for (a*)* and popula…
Copilot Jul 16, 2026
8a8590c
Expand C++ ReDoS test coverage (Phase 4 follow-up)
Copilot Jul 16, 2026
00672d6
Expand cpp/polynomial-redos test coverage (Phase 3 follow-up)
Copilot Jul 16, 2026
c1103b9
Fix C++ ECMAScript regex parser: recognize POSIX bracket sub-expressi…
Copilot Jul 17, 2026
d9f380d
POSIX bracket soundness: opaque punct/cntrl/print/graph; non-recursiv…
Copilot Jul 17, 2026
e0cc679
Add isBacktrackingEngine gate excluding awk/grep/egrep from C++ ReDoS…
Copilot Jul 17, 2026
e728c71
Refactor C++ regex parser into shared core + EcmaRegExp dialect hooks
Copilot Jul 17, 2026
9a3613e
Add POSIX ERE grammar support to the C++ regex parser
Copilot Jul 17, 2026
bc5cecf
Add end-to-end ERE ReDoS query tests
Copilot Jul 17, 2026
c1cb146
Add POSIX BRE grammar support: BreRegExp + shared-core refactor
Copilot Jul 17, 2026
8b12f32
Add BRE query test coverage and change note; regenerate .expected
Copilot Jul 17, 2026
918d51c
Add QLdoc to TRegexGrammar branches
Copilot Jul 17, 2026
9695195
Fix "modelled" -> "modeled" spelling in regex PR files
Copilot Jul 17, 2026
4435279
Replace omittable exists variables with don't-care _
Copilot Jul 17, 2026
9758d52
Fix Predicate QLDoc style: reword ecma_named_group_start doc to start…
Copilot Jul 17, 2026
b48b22c
Merge branch 'main' into copilot/add-cpp-regular-expression-parser
jketema Jul 17, 2026
6d07e4d
Apply codeql query format to regex library files
Copilot Jul 17, 2026
1c810ed
Replace non-ASCII characters (em/en dash, arrow) with ASCII equivalen…
Copilot Jul 17, 2026
cc95e25
Resolve dead-code alerts: export RegexPatternFlowConfig module
Copilot Jul 17, 2026
09938f0
Revert "Resolve dead-code alerts: export RegexPatternFlowConfig module"
Copilot Jul 17, 2026
4be7ff0
Convert ReDoS query tests to inline test expectations
Copilot Jul 17, 2026
2bab816
Remove redundant CompileCheck.ql to resolve dead-code alerts
Copilot Jul 17, 2026
c51dcdd
Add CWE-1333 ReDoS queries to cpp query-suite .expected snapshots
Copilot Jul 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cpp/ql/lib/change-notes/2026-07-15-cpp-regex-tree-view.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added an internal C++ regular-expression parse library (`semmle.code.cpp.regex.RegexTreeView`) that implements the shared `RegexTreeViewSig` signature. This is the foundation for future ReDoS analyses for C++ (`cpp/polynomial-redos` and `cpp/redos`). No new queries are added in this release.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added internal C++ regex usage and flow modeling (`semmle.code.cpp.regex.RegexFlowConfigs`). The `RegexTreeView` `RegExp` class now only matches `StringLiteral`s that flow to a `std::basic_regex` construction/assignment or a `std::regex_match`/`std::regex_search`/`std::regex_replace`/`std::regex_iterator`/`std::regex_token_iterator` call. Construction-site flags in `std::regex_constants` are detected (`icase`, `multiline`, and the grammar flags), including bitwise-`|` combinations. Literals constructed with an explicit non-ECMAScript grammar flag (`basic`, `extended`, `awk`, `grep`, `egrep`) are excluded from the ECMAScript-only parser. No new queries are added in this release.
1 change: 1 addition & 0 deletions cpp/ql/lib/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
codeql/mad: ${workspace}
codeql/quantum: ${workspace}
codeql/rangeanalysis: ${workspace}
codeql/regex: ${workspace}
codeql/ssa: ${workspace}
codeql/typeflow: ${workspace}
codeql/tutorial: ${workspace}
Expand Down
Loading
Loading