Skip to content

ci(deps): update sigma toolchain (major) - #353

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-sigma-toolchain
Closed

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-sigma-toolchain

Conversation

@renovate

@renovate renovate Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
pysigma ==1.5.1 → ==2.1.1 age confidence
pysigma-backend-splunk ==2.1.0 → ==3.0.1 age confidence
sigma-cli ==3.1.0 → ==4.0.1 age confidence

Release Notes

SigmaHQ/pySigma (pysigma)

v2.1.1

Compare Source

Security Fixes

  • GHSA-2j5x-hjg8-c64g – Jinja sandbox escape via Context.call leads to command execution (High):
    Templates in QueryTemplateTransformation and TemplateFinalizer could reach the internal
    j2template attribute, get a Jinja Context through Template.new_context() and use
    Context.call() to call pySigma methods that the sandbox blocks (e.g. pipeline.from_yaml).
    This bypasses the fix for GHSA-h72c-mm3x-7r8c from 2.0.0. Context.call is now blocked as a
    callable, and templates can no longer access the j2template attribute.
    Reported by @​Artur12555.
  • GHSA-49g2-8x9w-v6rm – ReDoS in sigma.matching: policy regex engine not applied to MatchCompiler (Moderate):
    MatchCompiler compiled regular expressions from rules (|re values and wildcards) with
    Python's backtracking re engine and ignored the configured SigmaPolicy. A rule like
    (a+)+$ together with a crafted field value could stall the matcher. All patterns are now
    compiled with the policy's regex engine (RE2 under the default SafePolicy). SigmaMatcher
    takes a policy argument and otherwise uses the pipeline's policy.
    Behaviour change: under SafePolicy, rules that use backreferences or lookaround now raise
    an error when the matcher is created.
    Reported by @​Gideon145.

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v2.1.0...v2.1.1

v2.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v2.0.3...v2.1.0

v2.0.3

Compare Source

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v2.0.2...v2.0.3

v2.0.2

Compare Source

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v2.0.1...v2.0.2

v2.0.1

Compare Source

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v2.0.0...v2.0.1

v2.0.0

Compare Source

pySigma 2.0 Introduction

Breaking Changes: SigmaPolicy as Central Security Control Point

pySigma 2.0 introduces SigmaPolicy — a unified security configuration framework that replaces scattered method parameters across the codebase. This is a breaking change but brings significant security and usability improvements.

What Changed:

  • Security-related settings (allow_template_vars, allow_external_sources, vars_allowed_paths, regex_engine) are no longer individual method parameters
  • All security settings now flow through the centralized SigmaPolicy dataclass
  • Pipeline loading methods (ProcessingPipeline.from_yaml(), from_dict()) now accept a policy parameter instead of individual flags
  • YAML and dictionary keys for security settings are explicitly stripped before instantiation — this prevents runtime opt-ins through untrusted pipeline definitions

Why This Matters:
pySigma operates in two fundamentally different trust models:

  • Private CI/CD pipelines: You control both rules and conversions — enable powerful features like template vars and external sources
  • Public web applications: Users upload rules — features that could be exploited are disabled by default

SigmaPolicy declares your trust model once, and those settings propagate through the entire pipeline automatically.

Predefined profiles available:

  • SafePolicy — RE2 engine, all security features disabled
  • TrustedPolicy — Python engine, for fully trusted rule sources

Check out the documentation for further details.

Hardened Defaults: DoS-Safe Regex Engine

Default regex engine is now RE2RegexEngine (backed by Google RE2):

  • ✅ Prevents catastrophic backtracking — no exponential time complexity from regex patterns
  • ✅ Eliminates ReDoS vulnerabilities from untrusted Sigma rules
  • ⚠️ Trade-off: RE2 doesn't support all advanced regex features that Python's re module does

If you need full regex compatibility, explicitly use PythonRegexEngine:

from sigma.policy import SigmaPolicy
from sigma.policy.regex_engine import PythonRegexEngine

policy = SigmaPolicy(regex_engine=PythonRegexEngine())  # Use with trusted rules only
Breaking API Changes

Method signatures have been updated across the codebase:

Before (v1.5.1):

pipeline = ProcessingPipeline.from_yaml(
    yaml_string,
    allow_template_vars=True,
    allow_external_sources=False,
    vars_allowed_paths=["/trusted/dir"]
)

After (v2.0.0):

from sigma.policy import SigmaPolicy

policy = SigmaPolicy(
    allow_template_vars=True,
    allow_external_sources=False,
    vars_allowed_paths=("/trusted/dir",)
)

pipeline = ProcessingPipeline.from_yaml(yaml_string, policy=policy)
Security Hardening Details
  • Top-level pipeline validation is strict: Unknown keys (including security settings) in YAML are rejected rather than silently passed through
  • Nested transformation sanitization: Security-related keys in transformation YAML are explicitly stripped before instantiation
  • Environment variable fallback: Legacy PYSIGMA_ALLOW_VARS_EXECUTION and PYSIGMA_ALLOW_EXTERNAL_SOURCES environment variables are respected as final fallback
  • Template sandboxing: Methods of arbitrary objects in templates are blocked; only safe built-in types (str, int, dict, list, etc.) can have methods called
Migration Guide

If upgrading from v1.5.1:

  1. Audit security settings in your pipeline definitions
  2. Replace method parameters with SigmaPolicy instances
  3. Explicit opt-in required for previously-enabled features (they now default to disabled)
  4. Update YAML pipelines — ensure security settings are passed as policy parameter, not as top-level keys
  5. Test thoroughly — the defaults are more restrictive for security

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma@v1.5.1...v2.0.0

SigmaHQ/pySigma-backend-splunk (pysigma-backend-splunk)

v3.0.1

Compare Source

Security fixes:

Full Changelog: SigmaHQ/pySigma-backend-splunk@v3.0.0...v3.0.1

v3.0.0

Compare Source

What's Changed

New Contributors

Full Changelog: SigmaHQ/pySigma-backend-splunk@v2.1.0...v3.0.0

SigmaHQ/sigma-cli (sigma-cli)

v4.0.1

Compare Source

Security Fixes

Full Changelog: SigmaHQ/sigma-cli@v4.0.0...v4.0.1

v4.0.0

Compare Source

Breaking Change by Security Hardening: Enhanced Sigma Policy and Safe Defaults

This release introduces comprehensive security hardening through new security policy profiles and safer defaults. The CLI now supports two explicit policies: Safe Policy (default) uses the RE2 regex engine to prevent DoS attacks, disables template variable expansion, and blocks external rule sources—ideal for untrusted rules. Trusted Policy uses Python's native regex engine with broader pattern support and allows template variables and external sources for controlled environments. By default, processing now prioritizes security with RE2 regex, disabled template variables, and blocked external sources.

Users can control security policies through command-line options: use --policy safe or --policy trusted, override the regex engine independently with --regex-engine re2 or --regex-engine python, and enable advanced features only when needed with --enable-template-vars (with security warning) or --allow-external-sources. The same security policies apply to both the convert and check commands. These settings are backward compatible—existing scripts can continue with --policy trusted if broader processing is required.

For most users, no action is required—safe defaults protect you automatically. If you need permissive processing with trusted rules, use --policy trusted. If you need specific advanced features, combine options as needed (e.g., --policy trusted --enable-template-vars). This approach reduces your attack surface from regex DoS and code execution while maintaining flexibility for legitimate use cases.

What's Changed

New Contributors

Full Changelog: SigmaHQ/sigma-cli@v3.1.0...v4.0.0


Configuration

📅 Schedule: (in timezone Etc/UTC)

  • Branch creation
    • "after 3am and before 7am on tuesday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from Gerrrt as a code owner October 6, 2026 03:13
@renovate renovate Bot added the dependencies label Oct 6, 2026
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch 2 times, most recently from 483c197 to 37b436e Compare October 10, 2026 22:10
@Gerrrt
Gerrrt enabled auto-merge (squash) October 10, 2026 22:13
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch 6 times, most recently from e7a606e to 82e7a92 Compare October 14, 2026 16:29
@Gerrrt

Gerrrt commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Leaving this open, not merging. All three red jobs are upstream, not this repo — reproduced locally with pip --dry-run and real runs of both validation planes:

Job Cause
sigma validate + compile sigma-cli 3.1.0, pysigma-backend-splunk 2.1.0, pysigma-backend-elasticsearch 2.1.1, pysigma-backend-kusto 1.0.1 all declare pysigma<2; no newer release of any exists. pip install -r detections/requirements.txt → ResolutionImpossible.
sigma rules fire on synthetic event logs zircolite 3.7.6 needs pysigma-pipeline-sysmon and pysigma-pipeline-windows, both pysigma<2. Same ResolutionImpossible.
cloud sigma rules fire on synthetic events pysigma 2 depends on google-re2, which ships wheels only up to cp314; this job runs Python 3.15 (#357), so pip tries the sdist and the build fails. The evaluator itself is fine: on Python 3.14 with pysigma 2.0.1, run-cloud-validation.sh passes 44/44.

Upstream "Support pySigma 2.0" work, all opened 2026-10-06 and still draft: splunk #85, elasticsearch #235, pipeline-windows #15, pipeline-sysmon #15. sqlite's (#16) is merged and is 2.1.0. Nothing yet for sigma-cli or kusto.

So this is the grouped major PR doing its job: it goes green once those ship and Renovate folds them in. Two things to remember when it does:

  1. Delete the pysigma-backend-sqlite allowedVersions rule in renovate.json in the same PR (added by the fix for ci(deps): update dependency pysigma-backend-sqlite to v2.1.0 #354 — that backend's 2.1.0 is its pySigma-2 release and merged alone it broke the host-plane gate on main).
  2. Python 3.15 + google-re2 will still bite unless google-re2 has published cp315 wheels by then; otherwise the two 3.15 jobs need a RE2 build step or a Python pin.

@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch from 82e7a92 to 9bdb939 Compare October 14, 2026 19:29
Gerrrt added a commit that referenced this pull request Oct 14, 2026
…ds pysigma 2 (#354) (#361)

2.1.0 is the backend's pySigma-2 release (pysigma>=2.0.0,<3.0) and the same
constraints file pins pysigma==1.5.1, so #354 made the set unresolvable: pip
stopped at ResolutionImpossible and `sigma rules fire on synthetic event logs`
has been red on main since 2026-10-10 with 0/123 rows run. With 2.0.0
(pysigma>=1.5.1,<2) it resolves and passes 123/123 against zircolite v3.7.6.

renovate.json holds the backend below 2.1.0 so it moves only with the pysigma
major in the grouped toolchain PR (#353, which stays open: sigma-cli and every
pinned backend/pipeline still declare pysigma<2, and pysigma 2's google-re2
has no Python 3.15 wheel). Delete that rule in the PR that takes pysigma 2.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch from 9bdb939 to 906bdb0 Compare October 14, 2026 19:35
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch 5 times, most recently from 87ff0b7 to b27d9f4 Compare October 14, 2026 23:32
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch from b27d9f4 to 5d8e663 Compare October 28, 2026 12:05
@renovate renovate Bot changed the title ci(deps): update dependency pysigma to v2 ci(deps): update sigma toolchain (major) Oct 28, 2026
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch 2 times, most recently from 4277fb9 to ceb5835 Compare November 1, 2026 20:57
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch 3 times, most recently from 81b67ed to 1cf42f1 Compare November 12, 2026 00:14
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch from 1cf42f1 to c6f7dae Compare November 15, 2026 17:53
@renovate
renovate Bot force-pushed the renovate/major-sigma-toolchain branch from c6f7dae to 68b5e86 Compare November 22, 2026 13:30
Gerrrt added a commit that referenced this pull request Nov 23, 2026
…nd supports 2 (#369)

The grouped sigma toolchain PR (#353) has been red since 2026-10-06 and
cannot go green from this repo: pysigma-backend-elasticsearch 2.1.1 and
pysigma-backend-kusto 1.0.1, the latest releases of both, still declare
pysigma<2.0.0, so pip fails with ResolutionImpossible before a single
rule is compiled or a fixture replayed. Every gate in that PR is red for
a reason no edit here can fix.

Hold pysigma below 2.0.0, and with it the two packages whose next
release requires pysigma 2: sigma-cli below 4.0.0 and
pysigma-backend-splunk below 3.0.0. pysigma-backend-sqlite already had
this hold (#354); its description now points at the others so all four
are deleted together, in the PR that takes pysigma 2, and the toolchain
still moves as one.

Patch and minor releases inside pySigma 1 keep arriving in the grouped
PR as before.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt

Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Closing: pysigma 2 cannot install while pysigma-backend-elasticsearch and pysigma-backend-kusto still require pysigma<2.0.0. #369 holds the toolchain on pySigma 1 until they ship pySigma-2 releases; delete those four hold rules in the PR that takes the major.

@Gerrrt Gerrrt closed this Nov 23, 2026
auto-merge was automatically disabled November 23, 2026 19:32

Pull request was closed

@renovate
renovate Bot deleted the renovate/major-sigma-toolchain branch November 23, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant