Update capa/ida/plugin/form.py

This commit is contained in:
Willi Ballenthin
2023-01-25 16:47:01 +01:00
committed by GitHub
parent 83eefd343c
commit e5549d6ce8

View File

@@ -1000,6 +1000,8 @@ class CapaExplorerForm(idaapi.PluginForm):
return
# we must create a deep copy of rules because any rule matching operations modify the original rule
# the ruleset may derive subscope rules from the source rules loaded from disk.
# by ignoring them, we reconstruct the collection of rules provided by the user.
rules = copy.deepcopy([r for r in self.ruleset_cache.rules.values() if not r.is_subscope_rule()])
rules.append(rule)