Skip to main content

pySigma Sumo Logic Backend

Status PyPI Python License Coverage

Overview

A pySigma backend that converts Sigma detection rules into Sumo Logic Cloud SIEM rule JSON, ready for import via the CSE API. Includes field mappings for 70+ log sources, automatic entity selector assignment, MITRE ATT&CK tag mapping, and confidence scoring.

Quick Start

pip install sigma-cli pysigma-backend-sumologic
sigma convert -t sumologic_cse_rule -p sumologic_cse rule.yml

Supported Log Sources

Full Field Mapping

These log sources have Sigma fields automatically renamed to CSE normalized schema fields:

Log Source Key Field Mappings
Process creation CommandLine→commandLine, Image→baseImage, ParentImage→parentBaseImage, User→user_username
Network connection SourceIp→srcDevice_ip, DestinationIp→dstDevice_ip, SourcePort→srcPort, DestinationPort→dstPort
DNS query QueryName→dns_query, QueryResults→dns_reply
File events TargetFilename→file_path, md5→file_hash_md5, SHA256→file_hash_sha256
Registry events TargetObject→changeTarget
Image load ImageLoaded→baseImage
Proxy / web c-uri→http_url, cs-method→http_method, sc-status→http_response_statusCode, cs-bytes→bytesOut, sc-bytes→bytesIn
Firewall src_ip→srcDevice_ip, dst_ip→dstDevice_ip, action→action
Windows authentication LogonType→logonType, TargetUserName→user_username, IpAddress→srcDevice_ip
Windows Sysmon Inherits process/network/file/registry mappings + EventID→metadata_deviceEventId
Windows PowerShell ScriptBlockText→commandLine
AWS CloudTrail eventName→action, sourceIPAddress→srcDevice_ip, userIdentity.arn→user_username
Azure Activity Logs operationName→action, callerIpAddress→srcDevice_ip
Office 365 Operation→action, ClientIP→srcDevice_ip

Metadata-Only (Vendor/Product Tagging)

These log sources get metadata_vendor and metadata_product injected into the query. Fields pass through as fields['FieldName'] in CSE syntax:

  • Windows (30+ services): powershell-classic, taskscheduler, WMI, DNS-server, windefend, driver-framework, etc.
  • AWS: S3, GuardDuty, VPC, WAF, Route53, Config, EKS, ELB, CloudWatch, SecurityHub, etc.
  • Azure: Sign-in Logs, Audit Logs, Firewall, Risk Detection, PIM, etc.
  • GCP: Audit, GCE, GCS, BigQuery, Security Center
  • Google Workspace: Admin, Login
  • Cisco: ASA, Firepower, ISE, Umbrella, Meraki, Duo, AnyConnect, etc.
  • Palo Alto Networks: Threat, Traffic, Cortex, GlobalProtect, Prisma Cloud, etc.
  • Fortinet: FortiGate, FortiClient
  • Other: Okta, OneLogin, GitHub, Kubernetes, Check Point, Zeek, Exchange

Output Format

Produces complete CSE rule JSON ready for the Rules API:

{
  "rules": [
    {
      "name": "Suspicious PowerShell Execution",
      "expression": "commandLine matches /.*powershell -enc.*/",
      "entity_selectors": [
        {"entity_type": "_hostname", "expression": "device_hostname"},
        {"entity_type": "_username", "expression": "user_username"},
        {"entity_type": "_process", "expression": "baseImage"}
      ],
      "score_mapping": {"default": 6, "type": "constant"},
      "tags": ["_mitreAttackTactic:TA0002", "_mitreAttackTechnique:T1059"],
      "category": "Execution",
      "enabled": true,
      "is_prototype": true,
      "conversion_metadata": {
        "sigma_status": "experimental",
        "mapping_confidence": {"overall_score": 0.691, "...": "..."}
      }
    }
  ]
}

How It Works

Field Mapping — The sumologic_cse pipeline renames Sigma standard fields to CSE normalized schema fields based on the rule's log source category.

Confidence Scoring — Each field mapping receives a confidence score (0–1). If the lowest score falls below the threshold (default: 0.25), conversion is blocked with a message showing exactly which fields failed and what threshold to use.

Entity Selectors — Automatically assigned based on log source category:

  • Process rules → hostname + username + process
  • Network/firewall rules → hostname + IP
  • DNS rules → hostname + domain
  • Authentication rules → hostname + IP + username
  • File rules → hostname + file path

MITRE ATT&CK — Tags from Sigma rules are mapped to CSE format (attack.execution → _mitreAttackTactic:TA0002).

Severity — Sigma levels map to CSE scores: critical=8, high=6, medium=3, low=1, informational=1.

Unmapped Field Handling

Scenario Behavior Confidence
Field mapped by pipeline Renamed to CSE schema field 0.85–1.0
Vendor-specific rule, unmapped field Passes through as fields['FieldName'] 0.8
Generic rule (no product), unmapped field Blocked with warning 0.0
Data field with Key=Value pattern Auto-converted to EventData.Key Normal
Data field with arbitrary string Blocked with helpful error N/A

Installation

From PyPI

pip install pysigma-backend-sumologic

From Source

git clone https://github.com/SumoLogic/pySigma-backend-sumologic
cd pySigma-backend-sumologic
pip install .

Usage

With sigma-cli

# Convert to CSE rule JSON
sigma convert -t sumologic_cse_rule -p sumologic_cse rule.yml

# Convert a directory of rules
sigma convert -t sumologic_cse_rule -p sumologic_cse ./rules/windows/

# Lower confidence threshold for more permissive conversion
sigma convert -t sumologic_cse_rule -p sumologic_cse -O min_confidence=0.0 rule.yml

As Python Library

from sigma.collection import SigmaCollection
from sigma.backends.sumologic import SumoLogicCSERuleBackend
from sigma.pipelines.sumologic import sumologic_cse_pipeline

pipeline = sumologic_cse_pipeline()
backend = SumoLogicCSERuleBackend(processing_pipeline=pipeline)

rule = SigmaCollection.from_yaml(open('rule.yml').read())
result = backend.convert(rule)
print(result[0])  # CSE rule JSON string

Configuration Options

Pass via -O key=value with sigma-cli or as constructor kwargs in Python:

Option Default Description
min_confidence 0.25 Minimum confidence score to allow conversion (0.0 disables threshold)
rule_source user Value of the rule_source field on converted rules
include_conversion_metadata true Include the conversion_metadata object in output
include_confidence_metadata true Include mapping_confidence in conversion_metadata
include_conversion_timestamp true Include conversion_timestamp in conversion_metadata (disable for reproducible output)
include_full_sigma_rule false Include the source Sigma rule YAML as full_sigma_rule in conversion_metadata
fail_on_unmapped_logsource false Error if rule's log source has no vendor/product mapping
schema_path bundled Path to a custom CSE schema file

Limitations

  • Correlation rules — Not supported (Sigma correlation features)
  • Data field arbitrary strings — Data|contains: 'Net.WebClient' cannot be converted (~12 Sigma rules affected). Structured patterns like Data|contains: 'EngineVersion=2.' are handled automatically.
  • Keywords field — Not supported (CSE requires structured field-based queries)
  • Complex regex — Limited support for advanced regex modifiers

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=sigma --cov-report=term

CI also runs mypy sigma/, so local changes should pass type checks before opening a PR.

Resources

License

LGPL-3.0 — see LICENSE.

Metadata

Release files for pysigma-backend-sumologic 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysigma-backend-sumologic 0.2.5
File Size Uploaded Provenance Actions
pysigma_backend_sumologic-0.2.5.tar.gz 70.8 kB With provenance Details for pysigma_backend_sumologic-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysigma-backend-sumologic 0.2.5
File Interpreter ABI Platform Actions
pysigma_backend_sumologic-0.2.5-py3-none-any.whl Python 3 none any Details for pysigma_backend_sumologic-0.2.5-py3-none-any.whl

Total release size: 144.6 kB

Release files / pysigma_backend_sumologic-0.2.5.tar.gz

Download URL pysigma_backend_sumologic-0.2.5.tar.gz
Size 70.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4248bc56d029b22dc60f230e74b9bd858b54183320be41e7ae4a9be5372b665d
BLAKE2b-256 checksum
How to use checksums
af229b427fc1349619f9764db692000d3cf4e96fd307be0205f5560393c3d6e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / pysigma_backend_sumologic-0.2.5-py3-none-any.whl

Download URL pysigma_backend_sumologic-0.2.5-py3-none-any.whl
Size 73.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b9f888c58371f7f3f22af569dcc5d1c8aa07525cb8755ec53f23fe3fd25e6ef
BLAKE2b-256 checksum
How to use checksums
479d12818ffdae886c4acdc44528b733d6b797eed1e4191c7a949b112e4feb61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for pysigma-backend-sumologic 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysigma_backend_sumologic-0.2.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page