muchdogesec / stix2arango

stix2arango is a command line tool that takes a group of STIX 2.1 objects in a bundle and inserts them into ArangoDB. It can also handle updates to existing objects in ArangoDB imported in a bundle.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Ensure when vertex object are updated, embedded relationships are updated accordingly #6

Closed himynamesdave closed 3 weeks ago

himynamesdave commented 4 weeks ago

If user updates an object and also marks for embedded relationships to be created, then any existing embedded relationships (_is_ref==true) should be updated accordingly.

https://github.com/muchdogesec/stix2arango/tree/optimizations/docs#updating-embedded-relationships-optional-user-setting

This feature was never actually implemented in the original code base (only the creation of new embedded relationships without the logic to consider old one representing the same relationship).

fqrious commented 3 weeks ago

what do you mean by update?

himynamesdave commented 3 weeks ago

Let's say in first import of a vertex object causes 3 embedded relationships to be created from it.

Lets say vertex object is updated in a new update (stix2arango valid update).

In such cases, the old 3 embedded relationships should be marked _is_latest==false

And however many embedded relationships in the update should be created with _is_latest==true

@fqrious

himynamesdave commented 3 weeks ago

I just added test 17 for this @fqrious and it seems to be working as expected, so closing