Flagsmith / Flagsmith/flagsmith-sql-flag-engine

RE2-unsafe regex patterns: audit production segments and decide fallback policy

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The translator returns `None` for any `REGEX` condition whose pattern contains:
- Backreferences (`\1`–`\9`)
- Lookarounds (`(?=`, `(?!`, `(?<=`, `(?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with `_RE2_UNSAFE` in `src/flagsmith_sql_flag_engine/translator.py` and inspect the engine-test-data suite. Run the proposed `REGEXP_LIKE` audit against the segments table’s `rules` JSON column to measure usage of backreferences and lookarounds. Done means the prevalence is recorded, a fallback policy is chosen, and the corresponding behavior is implemented and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.