Skip to content

Commit

Permalink
fix(Triage) adding checks for dict
Browse files Browse the repository at this point in the history
  • Loading branch information
r1chev committed Jan 9, 2025
1 parent b82da32 commit c99e4f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Triage/triage_modules/trigger_triage.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ def check_suspicious_analysis(self, sample_id: str, data: dict) -> bool:
try:
tags: list[str] = list()
tasks: list[dict] = list()
tags = data.get("analysis")["tags"]
if "linux" in tags:
tags = data.get("analysis", {}).get("tags")
if len(tags) == 0 or "linux" in tags:
return False
tasks = data.get("tasks")
tasks = data.get("tasks", [])
scores = []
for t in tasks:
if t.get("kind") == "behavioral":
scores.append(t.get("score"))
if t.get("kind") == "behavioral" and "score" in t:
scores.append(t["score"])
if len(scores) < 2:
self.log(f"PE in {sample_id} report does not have at least two dynamic analysis")
return True
Expand Down

0 comments on commit c99e4f6

Please sign in to comment.