mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-18 02:24:04 +00:00
Hashing files only when MVT_HASH_FILES env is set
This commit is contained in:
parent
4830aa5a6c
commit
3899dce353
|
@ -89,7 +89,9 @@ class Command(object):
|
|||
for coll in self.iocs.ioc_collections:
|
||||
info["ioc_files"].append(coll.get("stix2_file_path", ""))
|
||||
|
||||
if self.target_path:
|
||||
# TODO: Revisit if setting this from environment variable is good
|
||||
# enough.
|
||||
if self.target_path and os.environ.get("MVT_HASH_FILES"):
|
||||
if os.path.isfile(self.target_path):
|
||||
h = hashlib.sha256()
|
||||
with open(self.target_path, "rb") as handle:
|
||||
|
|
Loading…
Reference in New Issue
Block a user