RSigma: Sigma Detection Engineering Toolkit in Rust

Sigma detection engineering in one Rust binary

Parse, lint, evaluate, correlate, and convert Sigma rules from a single self-contained binary or embeddable Rust workspace. Built on open standards: Sigma v2.1.0, OpenTelemetry, STIX, TAXII and OCSF.

v0.28.0 MIT 91 lint rules All 8 correlations

Quick Start Install GitHub

Evaluate
Daemon
Convert
Rust
rsigma engine eval --pretty -r rules/ \
  -e '{"CommandLine":"cmd /c whoami"}'
{
  "rule_title": "Suspicious whoami invocation",
  "level": "medium",
  "matched_selections": ["selection"],
  "matched_fields": [
    {"field": "CommandLine", "value": "cmd /c whoami"}
  ]
}
rsigma engine daemon -r rules/ -p ecs_windows \
  --input http --api-addr 127.0.0.1:9090

Runs continuously with hot-reload, SQLite-backed correlation windows, NATS/OTLP/HTTP/stdin ingest, enrichers, risk-based alerting, and Prometheus metrics.

rsigma backend convert rules/ -t postgres
SELECT * FROM security_events
WHERE "CommandLine" ILIKE '%whoami%'

Native PostgreSQL/TimescaleDB, LynxDB, and Fibratus targets, plus 30+ pySigma backends via sigma-cli.

let collection = parse_sigma_yaml(yaml)?;
let mut engine = Engine::new();
engine.add_collection(&collection)?;
let matches = engine.evaluate(
    &JsonEvent::borrow(&event),
);

Workspace of 9 published crates on crates.io, plus WebAssembly support.

Install in one command

Prebuilt binary
Docker
Cargo
AI agents (MCP + skills)
curl -fsSL -o rsigma.tar.gz \
  https://github.com/timescale/rsigma/releases/download/v0.28.0/rsigma-x86_64-unknown-linux-gnu.tar.gz
tar -xzf rsigma.tar.gz && sudo install -m 0755 rsigma /usr/local/bin/rsigma
gh attestation verify rsigma-x86_64-unknown-linux-gnu.tar.gz --repo timescale/rsigma

Archives for Linux, macOS, and Windows (x86_64 and arm64) include SLSA build provenance. See Installation.

docker pull ghcr.io/timescale/rsigma:latest
docker run --rm --read-only --cap-drop=ALL \
  --security-opt=no-new-privileges:true \
  -v /path/to/rules:/rules:ro \
  ghcr.io/timescale/rsigma:latest rule validate /rules/

Multi-arch (linux/amd64, linux/arm64) images signed with keyless cosign, SPDX SBOM, and SLSA Build L3 provenance. See Docker deployment.

cargo install --locked rsigma
cargo install --locked rsigma-lsp

Requires Rust 1.97.1 or newer (2024 edition). Add --all-features to match the release archives.

rsigma mcp serve --rules-dir rules/
npx skills add timescale/sigma-rules -y && npx skills add timescale/rsigma -y

Expose structured tools (parse_rule, lint_rules, evaluate_events, convert_rules, …) to Cursor, Claude Code, and other MCP clients. See MCP server.

Performance at a glance

1.12M events/s

Single-core JSON runtime pipeline (100 rules); format auto-detect runs at 1.13M events/s.

404K events/s

End-to-end HTTP daemon across 8 cores with --logsource-routing on 3,132 SigmaHQ rules.

501K events/s

Stateful correlation throughput; loading 3,132 rules takes ~0.3 s and ~113 MB peak RSS.

2.85M events/s

Dynamic pipeline detection throughput once built, with zero per-event source resolution cost.

Measured on Apple M4 Pro; full Criterion tables and SigmaHQ corpus methodology live on the benchmarks page and in performance tuning.

One toolkit across the detection lifecycle

RSigma detection engineering loop

Author and test

Draft rules from logs (rule draft), propose verified filters (rule tune), lint against 91 checks with 14 auto-fixes, format (rule fmt), get real-time LSP diagnostics, and backtest corpora (rule backtest).

Linting · Drafting · Tuning · Backtest

Stream and alert

Run engine daemon with JSON, syslog, logfmt, CEF, EVTX, and OTLP over HTTP, NATS JetStream, Unix sockets, or stdin. Correlate in SQLite-backed windows, enrich via DNS, MMDB, STIX, or HTTP, score entity risk, group incidents, and send signed webhooks or OCSF findings.

Streaming daemon · Enrichers · Alert pipeline

Hunt and convert

Compile rules natively to PostgreSQL/TimescaleDB (five output modes including continuous aggregates), LynxDB, and Fibratus, or delegate 30+ SIEM targets to sigma-cli. Run read-only hunt run queries against archives and feed matches straight back into rule draft and rule backtest.

Rule conversion · Hunting · CLI Reference

Measure and govern

Export MITRE ATT&CK Navigator layers (rule coverage), score data-source maturity with DeTT&CT (rule visibility), inspect live field drift, fuse signals into keep/tune/retire verdicts (rule scorecard), and gate PRs with timescale/rsigma-action.

Scorecard · ATT&CK coverage · CI/CD

Why RSigma

RSigma combines pySigma-style conversion with a stateful streaming evaluator in one self-contained binary.

RSigma pySigma sigma_engine sigma-rust
Language Rust Python Rust Rust
Runtime evaluation Yes (streaming + stateful) No (converter only) Yes (stateless) Yes (stateless)
Correlation rules All 8 types Partial No No
Filter rules Yes Yes No No
Conversion backends PostgreSQL, LynxDB, Fibratus natively; pySigma backends through sigma-cli 30+ No No
Streaming daemon Yes (NATS, HTTP, OTLP) No No No
Dynamic pipelines Yes (HTTP, file, command, NATS) Yes (HTTP, file, command) No No
Built-in linter 91 rules, auto-fix Limited No No
LSP and MCP servers Yes No No No
Single binary Yes (multi-arch, signed) No (requires Python) Library only Library only
License MIT LGPL-3.0 AGPL-3.0 MIT

Built with RSigma

Detection engines and EDR
  • AxoDetect (Commercial): Axoflow’s detection workbench running Sigma rules in-stream inside its security data pipeline.
  • Rustinel (Apache-2.0): Cross-platform endpoint detection engine with RSigma as its Sigma backend for live telemetry.
  • Kestrel EDR (Apache-2.0): Self-hosted Windows EDR evaluating custom and SigmaHQ rules on-device.
  • Garmr (AGPL-3.0/commercial): Self-hosted application-audit and insider-risk platform using RSigma for per-event detection.
Telemetry, forensics, and pipelines
  • Sluice (AGPL-3.0): Generates Vector configs that trim SIEM ingest while proving with RSigma that Sigma detections and correlations still fire.
  • mozu (AGPL-3.0): Windows NTFS forensic triage from $MFT and $UsnJrnl:$J matching file records against Sigma rules.
  • LocalObserve: Local-first Linux security observability stack using RSigma for edge detection and webhooks.
  • LogsTotal (MIT): Self-hosted log analysis platform comparing findings across multiple Sigma engines.
Authoring, CTI, and testing
  • detection.studio (MIT): Browser-based Sigma playground with real-time evaluation via RSigma compiled to WebAssembly.
  • Sigmacatch (MIT): Captures live Windows Event Log events, matches them with RSigma, and writes SigmaHQ regression data.
  • sagan2sigma (GPL-2.0): Converts Sagan rules to Sigma and verifies them with RSigma.
  • Sheut (MPL-2.0): Local-first CTI workbench using RSigma for STIX 2.1 validation and interchange.
DEW #149 (March 2026)

“RSigma is essentially a SIEM. Building a tool like RSigma is challenging because the Sigma specification has evolved into a robust domain-specific language over the years.”

Read issue

tl;dr sec #320 (March 2026)

“Accurately evaluating the full spectrum of what Sigma rules can express is quite complex. It’s pretty neat to read about how RSigma handles all of these conditional expressions, correlating across rules, etc.”

Read issue

DEW #157 (May 2026)

“Instead of hardcoding IOC values in rule YAML, you declare external sources in the pipeline config, and RSigma fetches and injects them at evaluation time.”

Read issue

More coverage and newsletter mentions

Talks and deep dives

Talks
Selected articles
Full 9-part series
Event Talk Topic Materials
Linux Security Summit Europe 2026 Detection Engineering with RSigma One Linux detection from auditd and Tetragon telemetry through normalization, portable Sigma evaluation, stateful correlation, fixture-based testing, and deployment Video, slides, demo and materials
Article Topic
The State of RSigma A tour of everything RSigma does today and where it is headed
The State of RSigma, Part Two: The Loop One detection walked end to end through every station (Okta MFA reset to account takeover)
Building a Detection Layer on PostgreSQL with Sigma Rules Five PostgreSQL output formats and TimescaleDB continuous aggregates
Detection-as-Code in One GitHub Action with RSigma Gating a Sigma rule repository in CI with lint, validate, fields-drift, backtest, and ATT&CK coverage
# Article Topic
1 Pattern Detection and Correlation in JSON Logs Forensic investigation of a Trivy supply-chain compromise
2 Streaming Logs to RSigma for Real-Time Detection Okta cross-tenant impersonation via the daemon and NATS JetStream
3 Building a Detection Layer on PostgreSQL with Sigma Rules Five PostgreSQL output formats and TimescaleDB continuous aggregates
4 Security Observability with RSigma and the LGTM Stack Pairing RSigma with Loki, Mimir, and Grafana
5 Wiring Live Threat Intel into Sigma Detection with Dynamic Pipelines Dynamic pipelines: HTTP, file, command, and NATS sources
6 Cloud Detection at Scale on a Laptop Running cloud-scale detection locally with RSigma
7 The State of RSigma A tour of everything RSigma does today and where it is headed
8 Detection-as-Code in One GitHub Action with RSigma Gating a Sigma rule repository in CI with lint, validate, fields-drift, backtest, and ATT&CK coverage
9 The State of RSigma, Part Two: The Loop One detection through the full lifecycle: author, test, deploy, detect, alert and triage, measure, and hunt

Where to go next

Quick Start

Write a rule, evaluate an event, run the daemon with hot-reload, and convert to SQL in three minutes.

Start the tutorial

Core Concepts

Learn how Sigma detection, correlation, and filter rules map to engine eval, engine daemon, and pipelines.

Read core concepts

Library API

Embed rsigma-parser, rsigma-eval, rsigma-convert, rsigma-runtime, rsigma-mcp, or rstix in Rust.

Browse library docs

Architecture

Trace how rules flow from YAML through the AST, HIR, compiled engine, sinks, and WASM ABI.

Explore architecture

Latest release: v0.28.0 (MIT licensed, 9 crates, Rust 1.97.1, edition 2024). See release notes and version tags or the security policy.