MISP / misp-modules

Modules for expansion services, enrichment, import and export in MISP and other tools.
http://misp.github.io/misp-modules
GNU Affero General Public License v3.0
344 stars 233 forks source link

Fix regression in Virustotal modules #640

Closed sid1033224 closed 11 months ago

sid1033224 commented 11 months ago

Since commit d08bb5c3, the initial "file" object created by create_misp_object is overwritten by the subsequent enrichment logic which pulls relationship data, since they use the same variable name (file_object). This precludes data such as hashes, etc. from being returned as part of the enrichment process, and also creates self-references in the related files objects which are created.

This patch renames files_iterator and the associated variables declared in the subsequent for loop to related_files_iterator, related_file_object, etc. to prevent the original contents of file_object from being dropped.

adulau commented 11 months ago

Very good catch! Thank you.