You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(logql): close SQL injection and unbounded range loops (#12)
- Keep the regexp parser pattern and capture-group indexes in separate
fields. A label named __regex no longer puts the raw pattern into SQL.
- Cap Loki range queries at 11000 points per series, reject timestamps
that overflow int64 nanoseconds when aligned to the step, and count
steps by index instead of ts += step.
- Return an error for a lone '!' in a LogQL label filter instead of
looping forever.
- Normalize /loki/api/v1/label/<name>/... in request metrics so caller
text never becomes a metric label value.
- Add a fuzz test that sends queries through the HTTP API, records every
SQL statement, and checks that user text stays inside SQL literals.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>