🍒 11649 - Improve performance of regexps in IAST and query obfuscator#11710
Merged
manuel-alvarez-alvarez merged 1 commit intoJun 25, 2026
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a004f21de6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (348.695 µs) : 297, 400
. : milestone, 349,
basic (300.378 µs) : 293, 308
. : milestone, 300,
loop (8.99 ms) : 8984, 8996
. : milestone, 8990,
section candidate
noprobe (329.055 µs) : 305, 353
. : milestone, 329,
basic (296.782 µs) : 290, 303
. : milestone, 297,
loop (8.995 ms) : 8990, 9000
. : milestone, 8995,
|
Migrate the IAST evidence-redaction regexps to RE2/J for linear-time matching. RE2/J has no back-references, so the SQL tokenizer is reworked to find Postgres dollar-quoted literals via a precomputed tag index (binary search) and to enumerate Oracle q'...' delimiters explicitly instead of relying on a back-reference. Configured redaction patterns that are valid under java.util.regex but unsupported by RE2/J fall back to the defaults instead of failing to compile. Replace the query obfuscator's `while (matcher.find())` + per-match `Strings.replace` loop (O(N*Q)) with a single appendReplacement / appendTail pass (O(Q)). Add JUnit 5 tests for the tokenizers and the obfuscator, a tokenizer JMH benchmark, and migrate SensitiveHandlerTest from Groovy to JUnit 5. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit 92ebc2a)
manuel-alvarez-alvarez
force-pushed
the
malvarez/backport-pr-11649
branch
from
June 25, 2026 08:25
a004f21 to
3d95b09
Compare
PerfectSlayer
approved these changes
Jun 25, 2026
PerfectSlayer
left a comment
Contributor
There was a problem hiding this comment.
Re-applying the original approval to the backport PR.
manuel-alvarez-alvarez
merged commit Jun 25, 2026
7ed9344
into
release/v1.63.x
765 of 767 checks passed
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.
Backport #11649 to release/v1.63.x