STIXProject / python-stix

A Python library for parsing, manipulating, and generating STIX content.
http://stix.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
241 stars 88 forks source link

Report field ttp has the wrong type information #336

Closed rpiazza closed 6 years ago

rpiazza commented 6 years ago

There should be a type stix.report.ttps, but it apparently was never created, so in https://github.com/STIXProject/python-stix/commit/33c0b5c07866b3b40cfb9586a4b74c53062ec7ba it was changed to stix.core.ttps.TTPs - which does not allow entries with idrefs.

emmanvg commented 6 years ago

@rpiazza, can you provide an example code or the track-trace of the error you are experiencing?

rpiazza commented 6 years ago

Its not an issue that causes an exception. If you look at report/init.py line 72 - the type is different from all of the other fields - there should be a type stix.report.ttps.

gtback commented 6 years ago

Let's make sure to add a test that fails in the current code, but passes once this is done! I feel like we've gone back and forth on this a few times, and want to make sure we do it right!

emmanvg commented 6 years ago

There was not a lot I could do (I kept getting import errors). I added a test that tried to set a stix.core.ttps.TTPs to a stix.report.TTPs