From a47060b50316a04314bdcb762ceaff9110f9a61c Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:03:22 +0100 Subject: [PATCH] fix: report update with deterministic id --- .gitignore | 4 +++- dep_connector/converter_to_stix.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7326edf..8252d16 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,7 @@ __pycache__ .env .mypy_cache .ruff_cache +.uv_cache .venv -config.yml \ No newline at end of file +config.yml +scripts/ \ No newline at end of file diff --git a/dep_connector/converter_to_stix.py b/dep_connector/converter_to_stix.py index bb23ed7..c6a8cdf 100644 --- a/dep_connector/converter_to_stix.py +++ b/dep_connector/converter_to_stix.py @@ -281,7 +281,7 @@ def create_report(self, item: LeakRecord, object_refs: list[str]) -> stix2.Repor published = datetime.combine(item.date, datetime.min.time(), tzinfo=UTC) external_reference = self.build_primary_external_reference(item) custom_properties = self.build_primary_custom_properties(item) - report_id = pycti.Report.generate_id(name=report_name, published=published) + report_id = f"report--{uuid5(NAMESPACE_URL, f'dep-announcement:{item.normalized_hashid}')}" if custom_properties: return stix2.Report( id=report_id,