result_document.py: use the scopes attribute instead of meta["scope"]

This commit is contained in:
Yacine Elhamer
2023-08-18 14:15:36 +02:00
parent 5e31f0df23
commit d741544514

View File

@@ -169,7 +169,7 @@ class RangeStatement(StatementModel):
class SubscopeStatement(StatementModel):
type: Literal["subscope"] = "subscope"
description: Optional[str] = None
scope: capa.rules.Scope
scopes: capa.rules.Scopes
Statement = Union[
@@ -360,7 +360,7 @@ class Match(FrozenModel):
# note! replace `node`
node = StatementNode(
statement=SubscopeStatement(
scope=rule.meta["scope"],
scopes=rule.meta["scopes"],
)
)