Skip to content

Commit

Permalink
[FIX] Alert similarities associated with alternate customers
Browse files Browse the repository at this point in the history
  • Loading branch information
whikernel committed Sep 30, 2024
1 parent 01ba6a3 commit 95cd9b0
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions source/app/datamgmt/alerts/alerts_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,13 @@ def get_related_alerts_details(customer_id, assets, iocs, open_alerts, closed_al
.join(IocLink.ioc)
.join(IocLink.case)
.filter(
Ioc.ioc_value.in_(added_iocs),
close_condition
and_(
and_(
Ioc.ioc_value.in_(added_iocs),
close_condition,
),
Cases.client_id == customer_id
)
)
.distinct()
.all()
Expand All @@ -1008,8 +1013,13 @@ def get_related_alerts_details(customer_id, assets, iocs, open_alerts, closed_al
.with_entities(CaseAssets.case_id, CaseAssets.asset_name, Cases.name, Cases.close_date)
.join(CaseAssets.case)
.filter(
CaseAssets.asset_name.in_(added_assets),
close_condition
and_(
and_(
CaseAssets.asset_name.in_(added_assets),
close_condition
),
Cases.client_id == customer_id
)
)
.distinct(CaseAssets.case_id)
.all()
Expand Down

0 comments on commit 95cd9b0

Please sign in to comment.