From e40f8bf4669e3e0cbf61ffa97dd25b59148ff05e Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 6 Nov 2024 10:32:21 -0500 Subject: [PATCH] Improve SigmaTransformationError include the rule or detection item source --- sigma/processing/transformations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sigma/processing/transformations.py b/sigma/processing/transformations.py index 51567316..701e7eff 100644 --- a/sigma/processing/transformations.py +++ b/sigma/processing/transformations.py @@ -1117,7 +1117,7 @@ class RuleFailureTransformation(Transformation): def apply( self, pipeline: "sigma.processing.pipeline.ProcessingPipeline", rule: SigmaRule ) -> None: - raise SigmaTransformationError(self.message) + raise SigmaTransformationError(self.message, source=rule.source) @dataclass @@ -1131,7 +1131,7 @@ class DetectionItemFailureTransformation(DetectionItemTransformation): message: str def apply_detection_item(self, detection_item: SigmaDetectionItem) -> None: - raise SigmaTransformationError(self.message) + raise SigmaTransformationError(self.message, source=detection_item.source) @dataclass