From c4416d406af38fc54ab432733029d3670d01813a Mon Sep 17 00:00:00 2001 From: Nex Date: Sat, 6 Aug 2022 14:49:05 +0200 Subject: [PATCH] Avoiding duplicate entries for stix2 files with multiple malware definitions --- mvt/common/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mvt/common/command.py b/mvt/common/command.py index 08ef961..fae9741 100644 --- a/mvt/common/command.py +++ b/mvt/common/command.py @@ -91,7 +91,9 @@ class Command(object): } for coll in self.iocs.ioc_collections: - info["ioc_files"].append(coll.get("stix2_file_path", "")) + ioc_file_path = coll.get("stix2_file_path", "") + if ioc_file_path and ioc_file_path not in info["ioc_files"]: + info["ioc_files"].append(ioc_file_path) # TODO: Revisit if setting this from environment variable is good # enough.