Skip to content

Commit

Permalink
[RST Report Hub] Add missing generate id (#3290)
Browse files Browse the repository at this point in the history
  • Loading branch information
helene-nguyen authored Jan 16, 2025
1 parent a2ce4ed commit 2f2f4b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion external-import/rst-report-hub/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import stix2
import yaml
from dateutil.parser import parse
from pycti import OpenCTIConnectorHelper, get_config_variable
from pycti import OpenCTIConnectorHelper, StixCoreRelationship, get_config_variable


class ReportHub:
Expand Down Expand Up @@ -117,6 +117,9 @@ def create_observable(self, stix_indicator):
stix_observ = None
if stix_observ:
based_on = stix2.v21.Relationship(
id=StixCoreRelationship.generate_id(
"based-on", stix_indicator["id"], stix_observ["id"]
),
source_ref=stix_indicator["id"],
relationship_type="based-on",
target_ref=stix_observ["id"],
Expand Down

0 comments on commit 2f2f4b2

Please sign in to comment.