oasis-open / cti-stix-elevator

OASIS Cyber Threat Intelligence (CTI) TC Open Repository: Convert STIX 1.2 XML to STIX 2.x JSON
https://stix2-elevator.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 23 forks source link

Stopping infinite recursion in get_identity is hacky #273

Open rpiazza opened 3 years ago

rpiazza commented 3 years ago

The issue of the infinite recursion is as follows:

When you are processing X and part of that processing is to do many other things, one of which is to eventually need to process X - which appears to need processing because the original task has not completed.

It is currently implemented using the "dynamic scoping in python" Environment object. It is probably better to keep track of what objects are being processed and passing a list around as an argument to the various methods.