ReviewOS

zig-utils/zig-regex

[REGEX-03] Add bounded execution, prefilters, and ruleset caches

#16
Open chris opened this 8 days ago ·
8 days ago

Objective

Add match and depth limits with deterministic errors, required-literal prefilters, immutable concurrent compiled patterns, and ruleset-lifetime memoization suitable for untrusted WAF input.

Deliverables

  • Implement the complete scoped behavior without Git submodules.
  • Keep public APIs explicit about ownership, resource limits, and errors.
  • Add focused unit, integration, compatibility, fuzz, and benchmark coverage as applicable.
  • Update documentation and machine-readable compatibility status.

Acceptance criteria

  • The scoped implementation and tests are merged on main.
  • Zig formatting, focused tests, and the repository CI suite pass.
  • No unexplained compatibility skips, silent fallbacks, leaks, or unbounded hostile-input paths remain.
  • Benchmarks or security evidence is attached when this affects a hot or untrusted path.

Relationships

Blocked by

Blocks

Baselines

  • Zig 0.17-dev resolved and locked through Pantry.
  • ModSecurity 3.0.16, Coraza 3.7.0, CRS 4.28.0, and libinjection 4.0.0 where applicable.
8 days ago

Initial bounded-validation slice shipped in 8464f07. The new test-core gate completes in about 10 seconds locally and excludes fuzz/stress/benchmark qualification suites; the existing full test gate remains unchanged for issue boundaries. During audit, two full-suite runs exceeded multiple minutes and were stopped explicitly; this evidence should guide per-suite resource budgets and timeouts.

8 days ago

Bounded-gate update: zig build test-core provides a deterministic core correctness gate without the long-running fuzz/stress/benchmark suites. It passes locally and in hosted CI at b8ca89df644976801e0b6444419444b708eeaa25: https://github.com/zig-utils/zig-regex/actions/runs/29895566899. The complete legacy zig build test remains intentionally separate pending further suite decomposition.

8 days ago

REGEX-05 implementation landed on main as 957013d, adding exhaustive allocation-failure ownership safety for parser trees. This was discovered while integrating the bounded selector work tracked by zig-waf#16. The exact hosted SHA is being qualified before REGEX-05 closes.

Sign in to comment on this issue.