Skip to main content

What are Sigma rules?

Sigma is an open YAML format for writing log detection rules once and converting them into queries for Splunk, Sentinel, Elastic, and other SIEMs.

Glossary
Updated 2 min read

Definition

Sigma rules

Also called Sigma, Sigma rule, Sigma detection format

Sigma is an open, vendor-neutral format for writing detection rules for log data in YAML, so a rule can be written once, shared, and converted into the query language of whichever SIEM or log platform a team uses.

How it works

SigmaHQ describes Sigma rules as YAML files that contain everything needed to detect odd, bad, or malicious behavior in log files, usually within a SIEM. The project's README puts it as: Sigma is for log files what Snort is for network traffic and YARA is for files.

A rule has three main parts. Metadata covers the title, ID, status, author, references, and MITRE ATT&CK tags. The logsource block names the product and service the rule applies to. The detection block holds named selections of field values and a condition that combines them. Rules also list known false positives and a severity level.

Because no SIEM runs Sigma directly, backends convert rules into a target query language. The pySigma framework provides an API for each backend, and sigma-cli runs the conversion to SPL, KQL, Elastic queries, and others.

Example

This is the detection section of the example rule in SigmaHQ's documentation, which fires when an Okta account is locked out after too many failed sign-ins:

logsource:
  product: okta
  service: okta
detection:
  selection:
    displaymessage: Max sign in attempts exceeded
  condition: selection
falsepositives:
  - Unknown
level: medium

Why it matters for a SOC

Sigma separates detection logic from the SIEM it runs on. A team can adopt community rules (the SigmaHQ repository holds thousands, from generic technique detections to emerging-threat and threat-hunting rules), keep its own rules portable across a SIEM migration, and share detections with peers who run different tools. The trade-off is expressiveness: Sigma describes field matches and simple correlations well, but stateful logic, baselines, and enrichment usually have to be written in the target platform's language or in code, which is why teams treat Sigma as one input to detection engineering rather than the whole practice.

Go deeper

FAQ

How do you convert a Sigma rule to a SIEM query?
Sigma rules are converted with pySigma backends, usually through the sigma-cli tool. Each backend translates the rule into one platform's query language, such as Splunk SPL or Microsoft Sentinel KQL, often with a processing pipeline that maps Sigma field names to that platform's fields.

Sources

  1. Sigma rules | SigmaHQ documentation · accessed November 16, 2026
  2. GitHub - SigmaHQ/sigma: Main Sigma Rule Repository · accessed November 16, 2026
  3. Sigma backends | SigmaHQ documentation · accessed November 16, 2026

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo