mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
render: default: sanity check MBC
This commit is contained in:
@@ -180,7 +180,11 @@ def render_mbc(doc, ostream):
|
||||
if not rule["meta"].get("mbc"):
|
||||
continue
|
||||
|
||||
for mbc in rule["meta"]["mbc"]:
|
||||
mbcs = rule["meta"]["mbc"]
|
||||
if not isinstance(mbcs, list):
|
||||
raise ValueError("invalid rule: MBC mapping is not a list")
|
||||
|
||||
for mbc in mbcs:
|
||||
objective, _, rest = mbc.partition("::")
|
||||
if "::" in rest:
|
||||
behavior, _, rest = rest.partition("::")
|
||||
|
||||
Reference in New Issue
Block a user