Fix crit/warn bug with Defender alerts.

This commit is contained in:
Marsell Kukuljevic 2024-08-25 23:20:00 +02:00
parent 5fa472f450
commit 36a998cfc6
3 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -210,7 +210,7 @@ def check_defender(item, params, section):
if status != "Active" and status != "InProgress": if status != "Active" and status != "InProgress":
return return
severity = details["status"] severity = details["severity"]
url = details["url"] url = details["url"]
info = details["info"] info = details["info"]
@ -218,8 +218,10 @@ def check_defender(item, params, section):
state = State.CRIT state = State.CRIT
elif severity == "Medium": elif severity == "Medium":
state = State.WARN state = State.WARN
else: elif severity == "Low":
state = State.OK state = State.OK
else:
state = State.UNKNOWN
yield Result( yield Result(
state=state, state=state,