Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/cyvest/investigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def _merge_threat_intel(self, existing: ThreatIntel, incoming: ThreatIntel) -> T
- Update score (take maximum)
- Update level (take maximum)
- Update extra (merge dicts)
- Concatenate comments
- Overwrite comment (if incoming is non-empty)
- Merge taxonomies

Args:
Expand All @@ -519,12 +519,9 @@ def _merge_threat_intel(self, existing: ThreatIntel, incoming: ThreatIntel) -> T
# Update extra (merge dictionaries)
existing.extra.update(incoming.extra)

# Concatenate comments
# Overwrite comment if incoming is non-empty
if incoming.comment:
if existing.comment:
existing.comment += "\n\n" + incoming.comment
else:
existing.comment = incoming.comment
existing.comment = incoming.comment

# Merge taxonomies (ensure unique names)
existing_by_name: dict[str, int] = {taxonomy.name: idx for idx, taxonomy in enumerate(existing.taxonomies)}
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.