Skip to content

ci(deps): pin pysigma-backend-sqlite back to 2.0.0, cap it in Renovate (main is red) - #360

Closed
Gerrrt wants to merge 2 commits into
mainfrom
gerrrt/friendly-northcutt-27f825
Closed

Gerrrt wants to merge 2 commits into
mainfrom
gerrrt/friendly-northcutt-27f825

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

sigma-validation.yml's host-plane job has been red on every push to main since #354 (runs 219, 224): its install step fails with ResolutionImpossible before a single rule runs.

#354 bumped pysigma-backend-sqlite to 2.1.0, which moved to pySigma 2 (pysigma>=2.0.0,<3). docker/validation/zircolite-constraints.txt pins pysigma==1.5.1 and has to: sigma-cli 3.1.0, the splunk/elasticsearch/kusto backends in detections/requirements.txt, and zircolite's own sysmon/windows pipelines all still require pysigma<2. Bumping pysigma to 2.x in both pin files is not possible today, so the smallest change that makes CI green and keeps the two files agreeing is to put the backend back.

Changes

  • docker/validation/zircolite-constraints.txt: pysigma-backend-sqlite==2.0.0 again, the last release on pySigma 1.x and the one test(validation): timestamp correlation fixtures, test timespan, move sqlite pin to 2.0.0 #334 proved (upstream's 2.1.0 notes say 1.x installs keep resolving to 2.0.0). The header now records that 2.0.0 is a ceiling as well as a floor, and why.
  • renovate.json: allowedVersions: "<2.1.0" for the backend, so the grouped sigma toolchain PR does not re-open the same conflict weekly. The PR that moves pysigma to 2.x in both files drops the rule.
  • CHANGELOG.md: entry under [Unreleased] / Fixed.

Verification

  • Fresh venv: pip install -c docker/validation/zircolite-constraints.txt -r <Zircolite v3.7.6>/requirements.txt resolves (pySigma 1.5.1, pyparsing 3.3.3, sqlite backend 2.0.0, sysmon pipeline 2.0.0, windows pipeline 2.0.1). Before the change the same command reproduces ResolutionImpossible.
  • run-sigma-validation.sh with ZIRCOLITE at a v3.7.6 checkout: 123/123 passed (93 with a true-negative), all 19 -outside-window rows included.
  • sigma.yml's inputs (detections/requirements.txt) are untouched.

Worth knowing

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 14, 2026 19:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The restored pin and Renovate ceiling consistently address the documented dependency conflict.

0 open findings

What changed in this PR

Restores host Sigma validation compatibility with pySigma 1.x and prevents Renovate from repeating the incompatible upgrade.

Changes:

  • Re-pins the SQLite backend to 2.0.0 and caps Renovate updates below 2.1.0.
  • Documents the dependency conflict and validation results.
  • Corrects the documented ATT&CK tactic count.
File Description
renovate.json Prevents incompatible SQLite backend upgrades.
docker/​validation/​zircolite-constraints.txt Restores the pySigma 1.x-compatible pin.
CHANGELOG.md Records the CI failure and resolution.
.github/​workflows/​claude-routines.yml Corrects the coverage-table tactic count.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…e (main is red)

#354 bumped pysigma-backend-sqlite to 2.1.0, which moved to pySigma 2
(pysigma>=2.0.0,<3). zircolite-constraints.txt pins pysigma==1.5.1 and has to:
sigma-cli 3.1.0, the splunk/elasticsearch/kusto backends in
detections/requirements.txt and zircolite's own sysmon/windows pipelines all
still require pysigma<2. The constrained install step in sigma-validation.yml
has gone ResolutionImpossible on every push to main since (runs 219, 224), so
the host plane fails before it runs a single rule.

- zircolite-constraints.txt: back to ==2.0.0, the last release on pySigma 1.x
  and the one #334 proved; the header now records that 2.0.0 is a ceiling as
  well as a floor, and why.
- renovate.json: allowedVersions <2.1.0 for the backend, so the grouped PR does
  not re-open the same conflict weekly. The pysigma-2 PR for both pin files
  drops the rule.
- CHANGELOG: entry under [Unreleased] / Fixed.

Verified: fresh venv, `pip install -c docker/validation/zircolite-constraints.txt
-r <Zircolite v3.7.6>/requirements.txt` resolves (pySigma 1.5.1, pyparsing
3.3.3, sqlite backend 2.0.0); run-sigma-validation.sh against that checkout:
123/123 passed, 93 with a true-negative, all 19 -outside-window rows included.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt force-pushed the gerrrt/friendly-northcutt-27f825 branch from 1ae4358 to 59e19e7 Compare October 14, 2026 19:05
Gerrrt added a commit that referenced this pull request Oct 14, 2026
…e can run (#351)

The "sigma rules fire on synthetic event logs" job on this PR dies at pip install:
ResolutionImpossible, because the committed constraints pin pysigma-backend-sqlite
2.1.0 (the backend's pySigma-2 release) beside pysigma==1.5.1. #354 bumped it alone
and the job has been red on main since, with 0/123 rows executed — so the three new
4698 true positives and two true negatives in this PR could not be proven on CI.

Same one-line pin #360 and #361 carry; the full rationale and the Renovate cap live
there, and this line merges identically under either. Verified: a fresh venv built
from this file resolves (pysigma 1.5.1, backend 2.0.0) and run-sigma-validation.sh
passes 123/123 from it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Gerrrt added a commit that referenced this pull request Oct 14, 2026
…ree filter_ci stubs, 4698 LOLBins gated (#359)

* fix(sigma): act on the #351 detection review — /identity anchored, three filter_ci stubs, 4698 LOLBins gated (#351)

The weekly review found no coverage holes and ten scoping calls. Each was checked
against the rule body, the gates and the fixtures. Seven adopted, two documented as
stated blind spots, four sub-proposals declined in the rule bodies so they are not
re-proposed next cycle.

What each change would have missed, or stops missing:

- linux/ssh_private_key_read: `name|contains: '/identity'` matched every read under a
  directory named identity* (~/identity-service/config.yml) - a standing FP stream on a
  high rule. Now '/.ssh/identity'. The TN fixture gains that exact near-miss, which the
  old value fired on.
- cloudflare/cloudflare_api_token_created, terraform/tfc_token_backdoor,
  gitlab/gitlab_token_backdoor: bare `condition: selection` while every folder sibling
  carried a DEPLOY-REQUIRED filter_ci, on actions the IaC provider performs on every
  apply. Each gets the sibling's stub, a _ci_suppressed manifest row and a README
  deploy-time row. aws_login_profile_created declined in-rule (actor != target is the
  triage criterion; medium is a triage surface).
- cloud/entra_illicit_consent_grant: comment + falsepositives record that the
  unanchored TargetResources allowlist hides a grant to a different app whenever a
  sanctioned id appears anywhere in the event, and name the Sentinel paths to anchor on.
- lateral_movement/rdp_hijack_tscon_4688: declined, reworded. The review read the arms
  the other way round - the /dest: arm is channel-independent and deliberately not
  Image-pinned; the Sysmon-only arm is the no-/dest interactive form.
- persistence/scheduled_task_suspicious_4698: \regsvr32.exe and \rundll32.exe fired at
  high as bare substrings. They now require a co-occurring attacker-controlled target
  (URL/scriptlet, UNC, user-writable dir); mshta stays bare. Two traps written into the
  block: a bare 'http' matches the <Task xmlns="http://..."> root of every real 4698 and
  would have collapsed the AND (synthetic fixtures omit the root; the new TN carries
  it), and a UNC prefix is '\\\\' because \ is Sigma's escape. Neither LOLBin had a
  fixture before; three TPs and two TNs added.
- lateral_movement/passthehash_4624_fanout: filter_machine stated as a coverage
  decision (captured machine-account hash reuse never reaches the count) and why Sigma
  cannot narrow it.
- impact/service_stop_burst: ' stop' -> ' stop ' on the net/sc arms (the anchor the
  protected-services sibling uses); a bare ' stop' also matched ' stopped' and padded the
  distinct-CommandLine burst. Cmdlet anchoring declined in-rule (piped `| Stop-Service`
  has no trailing target). Precedence allowlist row re-traced.
- impact/account_access_removal_4725: declined in-rule - 4724 pooled on purpose; the
  bulk forced reset that trips it is filter_identity_admins' job.
- registry/harbor_image_pushed_trusted_tag: retitled "Harbor artifact push or tag create
  (supply-chain triage surface)" to match the logic. File name and pairing unchanged.
- google_workspace/gws_external_mail_forwarding: verified against the Reports API
  appendix; service: user_accounts is correct. Recorded in a logsource comment.

Ledger: 124 rules, 0 added. coverage-layer.json, COVERAGE.md and HTPX-COVERAGE.md
unchanged; all three SIEM forms regenerated.

Checks run locally: sigma check, make drift, make methodology, make validation-gates,
make test, make attack-tags, make htpx, run-cloud-validation (47/47),
run-sigma-validation 123/123 (zircolite v3.7.6, with pysigma-backend-sqlite pinned to
2.0.0 locally because the committed constraints file does not resolve since #354 - a
pre-existing red gate, not touched here). The three new 4698 TPs and two TNs were also
run one event at a time: all three fire, both stay silent, and the rooted TN fires the
moment '>http' is loosened to 'http'. make markdown skipped - no npx on this host; the
README rows are padded to the header widths by hand.

Closes #351

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(validation): pin pysigma-backend-sqlite to 2.0.0 so the host plane can run (#351)

The "sigma rules fire on synthetic event logs" job on this PR dies at pip install:
ResolutionImpossible, because the committed constraints pin pysigma-backend-sqlite
2.1.0 (the backend's pySigma-2 release) beside pysigma==1.5.1. #354 bumped it alone
and the job has been red on main since, with 0/123 rows executed — so the three new
4698 true positives and two true negatives in this PR could not be proven on CI.

Same one-line pin #360 and #361 carry; the full rationale and the Renovate cap live
there, and this line merges identically under either. Verified: a fresh venv built
from this file resolves (pysigma 1.5.1, backend 2.0.0) and run-sigma-validation.sh
passes 123/123 from it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(sigma): legacy ssh key gets its own endswith selection; each 4698 LOLBin case its own row (#351)

Two review findings on #359, both right:

- ssh_private_key_read: '/.ssh/identity' under name|contains still took
  ~/.ssh/identity-service/config.yml while the description claimed an exact match.
  The SSHv1 key is now selection_legacy with name|endswith, ORed with the id_* list
  under the shared key term. That makes the Splunk form `(a) OR (b) NOT (filter)`, so
  the binding is traced in splunk-precedence-allowlist.tsv: key gates both branches and
  the reader/pubkey filter covers both. Proven by a single-event row (tar reading
  /root/.ssh/identity) and two near-misses on the TN (identity-service/ inside and
  outside .ssh/).
- scheduled_task_suspicious_4698: the three LOLBin true positives sat in the aggregate
  TP file, which passes when ANY event fires - the existing 21 already did, so the new
  arms could go silent unnoticed. Each is now its own single-event row
  (lolbin-userdir, -scriptlet, -unc) against a dedicated LOLBin TN file carrying the
  real <Task xmlns> root. The aggregate files go back to what they held before.

run-sigma-validation.sh 127/127 (zircolite v3.7.6); drift, methodology,
validation-gates and tests green.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt enabled auto-merge (squash) October 14, 2026 19:28
#359 applied the same pysigma-backend-sqlite==2.0.0 pin with a placeholder comment
pointing at this PR for the full account; this keeps the pin and the full header
paragraph and drops the placeholder. Both CHANGELOG entries stay, this PR's first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt

Gerrrt commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #361, which landed the same fix on main: pysigma-backend-sqlite pinned at 2.0.0, Renovate cap below 2.1.0, CHANGELOG entry.

@Gerrrt Gerrrt closed this Oct 14, 2026
auto-merge was automatically disabled October 14, 2026 19:42

Pull request was closed

@Gerrrt
Gerrrt deleted the gerrrt/friendly-northcutt-27f825 branch October 14, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants