diff --git a/capa/render/__init__.py b/capa/render/__init__.py index cafa7aac..e53aca1f 100644 --- a/capa/render/__init__.py +++ b/capa/render/__init__.py @@ -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