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.
Since commit
d08bb5c3
, the initial "file" object created bycreate_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 torelated_files_iterator
,related_file_object
, etc. to prevent the original contents offile_object
from being dropped.