diff --git a/tools/sigma/parser/collection.py b/tools/sigma/parser/collection.py index b7cc9ccf1..893412d1b 100644 --- a/tools/sigma/parser/collection.py +++ b/tools/sigma/parser/collection.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +import copy import yaml from .exceptions import SigmaCollectionParseError from .rule import SigmaParser @@ -61,7 +62,7 @@ class SigmaCollectionParser: elif action == "repeat": if prevrule is None: raise SigmaCollectionParseError("action 'repeat' is only applicable after first valid Sigma rule") - newrule = prevrule.copy() + newrule = copy.deepcopy(prevrule) deep_update_dict(newrule, yamldoc) if rulefilter is None or rulefilter is not None and not rulefilter.match(newrule): self.parsers.append(SigmaParser(newrule, config))