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.
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.
Related terms
- YARA rulesYARA rules are pattern-matching descriptions of malware or other files, made of text, hexadecimal, or regular expression strings plus a Boolean condition, that the open-source YARA tool uses to identify and classify matching files.
- Detection engineeringDetection engineering is the practice of designing, building, testing, deploying, and maintaining the rules and analytics that turn security telemetry into alerts, treated with the rigor of software engineering.
- KQLKQL (Kusto Query Language) is Microsoft's read-only query language for exploring logs and telemetry, written as a sequence of operators piped from one to the next, and used in Microsoft Sentinel, Azure Monitor, and Azure Data Explorer.
- SPLSPL (Search Processing Language) is Splunk's query language, made of search commands chained with pipes that retrieve events from indexes and then filter, transform, and aggregate them.
- MITRE ATT&CKMITRE ATT&CK is a free, publicly maintained knowledge base that catalogs the tactics and techniques attackers use against real systems, based on observed intrusions, and gives defenders a shared vocabulary for detection and threat intelligence.
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
- Sigma rules | SigmaHQ documentation · accessed November 16, 2026
- GitHub - SigmaHQ/sigma: Main Sigma Rule Repository · accessed November 16, 2026
- Sigma backends | SigmaHQ documentation · accessed November 16, 2026
