diff --git a/CHANGELOG.md b/CHANGELOG.md index e76fa7db..54fc113c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Version 2.1.6 (20/12/2019) +*No changelog for this release.* + +--- + ## Version 2.1.5 (19/12/2019) #### Enhancements: diff --git a/pycti/utils/opencti_stix2.py b/pycti/utils/opencti_stix2.py index 9799de6d..244195e1 100644 --- a/pycti/utils/opencti_stix2.py +++ b/pycti/utils/opencti_stix2.py @@ -302,6 +302,7 @@ def import_object(self, stix_object, update=False, types=None): embedded_relationships = self.extract_embedded_relationships(stix_object, types) created_by_ref_id = embedded_relationships['created_by_ref'] marking_definitions_ids = embedded_relationships['marking_definitions'] + tags_ids = embedded_relationships['tags'] kill_chain_phases_ids = embedded_relationships['kill_chain_phases'] object_refs_ids = embedded_relationships['object_refs'] external_references_ids = embedded_relationships['external_references'] @@ -357,6 +358,13 @@ def import_object(self, stix_object, update=False, types=None): entity=stix_object_result, marking_definition_id=marking_definition_id ) + # Add tags + for tag_id in tags_ids: + self.opencti.stix_entity.add_tag( + id=stix_object_result['id'], + entity=stix_object_result, + marking_definition_id=tag_id + ) # Add external references for external_reference_id in external_references_ids: self.opencti.stix_entity.add_external_reference(