pySigma-backend-sqlite 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pySigma-backend-sqlite
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: pySigma sqlite backend
5
5
  License-Expression: LGPL-3.0-only
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pySigma-backend-sqlite"
3
- version = "1.1.2"
3
+ version = "1.1.3"
4
4
  description = "pySigma sqlite backend"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -687,23 +687,18 @@ class sqliteBackend(TextQueryBackend):
687
687
  channels = self._extract_field_values_from_rule(rule, "Channel")
688
688
  event_ids = self._extract_field_values_from_rule(rule, "EventID")
689
689
 
690
- rule_as_dict = rule.to_dict()
691
-
690
+ # Access rule properties directly instead of using to_dict() to avoid
691
+ # SigmaValueError when pipeline transformations have modified detection items
692
+ # in ways that make them non-serializable back to plain data types.
692
693
  zircolite_rule = {
693
- "title": rule_as_dict["title"],
694
- "id": rule_as_dict["id"] if "id" in rule_as_dict else "",
695
- "status": rule_as_dict["status"] if "status" in rule_as_dict else "",
696
- "description": (
697
- rule_as_dict["description"] if "description" in rule_as_dict else ""
698
- ),
699
- "author": rule_as_dict["author"] if "author" in rule_as_dict else "",
700
- "tags": rule_as_dict["tags"] if "tags" in rule_as_dict else [],
701
- "falsepositives": (
702
- rule_as_dict["falsepositives"]
703
- if "falsepositives" in rule_as_dict
704
- else []
705
- ),
706
- "level": rule_as_dict["level"] if "level" in rule_as_dict else "",
694
+ "title": rule.title,
695
+ "id": str(rule.id) if rule.id else "",
696
+ "status": rule.status.name.lower() if rule.status else "",
697
+ "description": rule.description if rule.description else "",
698
+ "author": rule.author if rule.author else "",
699
+ "tags": [str(tag) for tag in rule.tags] if rule.tags else [],
700
+ "falsepositives": list(rule.falsepositives) if rule.falsepositives else [],
701
+ "level": rule.level.name.lower() if rule.level else "",
707
702
  "rule": [sqlite_query],
708
703
  "filename": "",
709
704
  "channel": channels,