cti-python-stix2 icon indicating copy to clipboard operation
cti-python-stix2 copied to clipboard

Opinion/Note API

Open emmanvg opened this issue 7 years ago • 3 comments

This one should be relatively simple. Given an arbitrary number of SDO/SROs, create helpers that would allow the creation of Opinions or Note. The helper needs to accept identifier strings or just passing Objects and extracting their id to populate the object_refs property.

emmanvg avatar Oct 12 '17 14:10 emmanvg

@emmanvg was this to be implemented as a x_ custom property? I am going through and adding the same thing to my implementation, and have been looking at a helper that would add x_notes x_opinion sort of thing with a array of strings. Could also be enriched with Data Markings

StephenOTT avatar Nov 21 '18 21:11 StephenOTT

Hi @StephenOTT, we have not made a solid decision on how to implement this API. At the very least we plan to leverage the Opinion object defined under STIX 2.1 for which we already have an implementation[1]. This code is yet to be released but we are close.

Out of curiosity. Why did you choose x_notes and x_opinion to be array of strings?

On the Data Markings side of things... The objects I linked here will support object_markings and granular_markings like any other SDO. Did you have something else in mind?

[1] https://github.com/emmanvg/cti-python-stix2/blob/1.1.0-release/stix2/v21/sdo.py#L371-L406 [2] https://github.com/emmanvg/cti-python-stix2/blob/1.1.0-release/stix2/v21/sdo.py#L295-L320

emmanvg avatar Nov 27 '18 13:11 emmanvg

Out of curiosity. Why did you choose x_notes and x_opinion to be array of strings?

Arrays was thought of because I can see a object being populated over multiple "steps", and possibly from different systems or people, and that there would be many notes that get added to the object. A array of objects works well, but I was keeping it simple in my first iteration of this. In general if an array is not used, then you are having to continually append a single string, which becomes messy and ripe for errors.

StephenOTT avatar Nov 27 '18 13:11 StephenOTT