INNER CODE UNIT · Python

load_datastore

mitre-attack/attack-scripts · scripts/diff_stix.py:185

                def load_datastore(data_store):
                    raw_data = list(chain.from_iterable(
                        data_store.query(f) for f in attackTypeToStixFilter[obj_type]
                    ))
                    raw_data = self.deep_copy_stix(raw_data)
                    id_to_obj = {item['id']: item for item in raw_data}

                    return {
                        "id_to_obj": id_to_obj,
                        "keys": set(id_to_obj.keys()),
                        "data_store": data_store
                    }

                def parse_subtechniques(data_store, new=False):
                    # parse dataStore sub-technique-of relationships
                    if new: 
                        for technique in list(data_store.query(attackTypeToStixFilter["technique"])):
                            self.new_id_to_technique[technique["id"]] = technique

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…