pySigma 1.3.1__tar.gz → 1.3.2__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.
- {pysigma-1.3.1 → pysigma-1.3.2}/PKG-INFO +1 -1
- {pysigma-1.3.1 → pysigma-1.3.2}/pyproject.toml +1 -1
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/tags.py +12 -2
- {pysigma-1.3.1 → pysigma-1.3.2}/LICENSE +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/README.md +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/backends/test/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/backends/test/backend.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/collection.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/conditions.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/conversion/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/conversion/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/conversion/deferred.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/conversion/state.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/correlations.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/data/mitre_attack.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/data/mitre_d3fend.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/exceptions.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/filters.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/modifiers.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/pipelines/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/pipelines/common.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/pipelines/test/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/pipelines/test/pipeline.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/plugins.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/condition_expressions.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/fields.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/rule.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/state.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/conditions/values.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/finalization.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/pipeline.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/postprocessing.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/resolver.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/templates.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/tracking.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/condition.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/detection_item.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/failure.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/fields.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/meta.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/placeholder.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/rule.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/state.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/processing/transformations/values.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/py.typed +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/attributes.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/detection.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/logsource.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/rule/rule.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/types.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validation.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/base.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/__init__.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/condition.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/logsources.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/metadata.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/modifiers.py +0 -0
- {pysigma-1.3.1 → pysigma-1.3.2}/sigma/validators/core/values.py +0 -0
|
@@ -43,7 +43,10 @@ class ATTACKTagValidator(SigmaTagValidator):
|
|
|
43
43
|
"""Check for usage of valid MITRE ATT&CK tags."""
|
|
44
44
|
|
|
45
45
|
def __init__(self) -> None:
|
|
46
|
-
self.allowed_tags =
|
|
46
|
+
self.allowed_tags: set[str] | None = None
|
|
47
|
+
|
|
48
|
+
def _load_allowed_tags(self) -> set[str]:
|
|
49
|
+
return (
|
|
47
50
|
{tactic.lower() for tactic in mitre_attack.mitre_attack_tactics.values()}
|
|
48
51
|
.union({technique.lower() for technique in mitre_attack.mitre_attack_techniques.keys()})
|
|
49
52
|
.union(
|
|
@@ -62,6 +65,8 @@ class ATTACKTagValidator(SigmaTagValidator):
|
|
|
62
65
|
)
|
|
63
66
|
|
|
64
67
|
def validate_tag(self, tag: SigmaRuleTag) -> list[SigmaValidationIssue]:
|
|
68
|
+
if self.allowed_tags is None:
|
|
69
|
+
self.allowed_tags = self._load_allowed_tags()
|
|
65
70
|
if tag.namespace == "attack" and tag.name not in self.allowed_tags:
|
|
66
71
|
return [InvalidATTACKTagIssue([self.rule], tag)]
|
|
67
72
|
return []
|
|
@@ -78,13 +83,18 @@ class D3FENDTagValidator(SigmaTagValidator):
|
|
|
78
83
|
"""Check for usage of valid MITRE D3FEND tags."""
|
|
79
84
|
|
|
80
85
|
def __init__(self) -> None:
|
|
81
|
-
self.allowed_tags =
|
|
86
|
+
self.allowed_tags: set[str] | None = None
|
|
87
|
+
|
|
88
|
+
def _load_allowed_tags(self) -> set[str]:
|
|
89
|
+
return (
|
|
82
90
|
{tactic.lower() for tactic in mitre_d3fend.mitre_d3fend_tactics.keys()}
|
|
83
91
|
.union({technique.lower() for technique in mitre_d3fend.mitre_d3fend_techniques.keys()})
|
|
84
92
|
.union({artefact for artefact in mitre_d3fend.mitre_d3fend_artifacts.keys()})
|
|
85
93
|
)
|
|
86
94
|
|
|
87
95
|
def validate_tag(self, tag: SigmaRuleTag) -> list[SigmaValidationIssue]:
|
|
96
|
+
if self.allowed_tags is None:
|
|
97
|
+
self.allowed_tags = self._load_allowed_tags()
|
|
88
98
|
if tag.namespace == "d3fend" and tag.name not in self.allowed_tags:
|
|
89
99
|
return [InvalidD3FENDagIssue([self.rule], tag)]
|
|
90
100
|
return []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|