mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 07:10:29 -08:00
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
import six
|
||||
|
||||
import capa.rules
|
||||
import capa.engine
|
||||
|
||||
|
||||
@@ -150,6 +151,9 @@ def convert_match_to_result_document(rules, capabilities, result):
|
||||
if isinstance(result.statement, capa.features.Feature):
|
||||
if bool(result.success):
|
||||
doc['locations'] = result.locations
|
||||
elif isinstance(result.statement, capa.rules.Range):
|
||||
if bool(result.success):
|
||||
doc['locations'] = result.locations
|
||||
|
||||
# if we have a `match` statement, then we're referencing another rule.
|
||||
# this could an external rule (written by a human), or
|
||||
|
||||
Reference in New Issue
Block a user