Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuning Wiz Alert Passthrough rule #1326

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 6 additions & 2 deletions rules/wiz_rules/wiz_alert_passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def rule(event):
return event.get("status") == "OPEN"
return event.get("status") == "OPEN" and event.get("severity") != "INFORMATIONAL"


def title(event):
Expand All @@ -13,11 +13,15 @@ def title(event):


def severity(event):
if event.get("severity") == "INFORMATIONAL":
arielkr256 marked this conversation as resolved.
Show resolved Hide resolved
return "INFO"
return event.get("severity")


def dedup(event):
return event.get("id")
return event.deep_get(
"entitySnapshot", "externalId", default="<RESOURCE_NOT_FOUND>"
) + event.get("severity", "<SEVERITY_NOT_FOUND>")


def description(event):
Expand Down
2 changes: 1 addition & 1 deletion rules/wiz_rules/wiz_alert_passthrough.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Filename: wiz_alert_passthrough.py
Severity: Medium
LogTypes:
- Wiz.Issues
DedupPeriodMinutes: 60
DedupPeriodMinutes: 720
Threshold: 1
Tests:
- Name: Open Alert
Expand Down
Loading