Conversation
Add a new conversion backend targeting the LynxDB log analytics engine. The backend generates `FROM <index> | search <predicates>` queries with glob wildcards, deferred `| where` clauses for regex and CIDR matching, CASE() for case-sensitive values, and explicit AND-group parenthesization to handle LynxDB's non-standard boolean precedence (NOT > OR > AND). Includes unit tests, golden tests for 9 representative Sigma rules, CLI registration, and README documentation for both the crate and root.
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.
Summary
rsigma-convertbackend targeting the LynxDB log analytics engine, generating SPL2-compatibleFROM <index> | search <predicates>queries*), deferred| whereclauses for regex/CIDR/single-char wildcards,CASE()for case-sensitive matching, and explicit AND-group parenthesization for LynxDB's non-standard boolean precedence (NOT > OR > AND)-t lynxdb), add unit tests (30+ cases covering all value types, modifiers, boolean logic, deferred expressions, output formats), golden tests for 9 representative Sigma rules, and documentation in both crate and root READMEsWhat's included
Backend (
crates/rsigma-convert/src/backends/lynxdb/mod.rs)LYNXDB_CONFIG(TextQueryConfig) with LynxDB-specific tokens, operators, wildcards, quoting, and expression templatesLynxDbBackendimplementing theBackendtrait with overrides for:convert_condition_and/convert_condition_or: filter empty strings from deferred items and parenthesize AND groupsconvert_field_eq_re/convert_field_eq_cidr: returnConvertResult::Deferredfor| wherepipeline stagesfinish_query: apply pipeline state (e.g. custom index) before defaultsfinalize_query: supportdefaultandminimaloutput formatsTests
.yml+.expectedpairs: simple_eq, and_or_not, wildcards, regex, cidr, keywords, exists_null_bool, numeric_compare, brute_forceCLI & docs
lynxdbtarget inget_backend()andcmd_list_targets()crates/rsigma-convert/README.mdwith usage examples, output formats, index selection, modifier mapping table, precedence and deferred expression documentationREADME.mdwith CLI examples and architecture diagramTest plan
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets --all-features -- -D warningspassescargo test --workspacepasses (all existing + new tests)@OrlovEvgeny Please test and provide feedback.