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

[Feature] Related Alerts Module - Sort by "StartTime" desc #477

Closed
NobleWolf opened this issue Jan 3, 2025 · 4 comments · Fixed by briandelmsft/STAT-Function#135 or #484
Closed
Labels
enhancement Enhancement to existing module module/relatedalerts Related Alerts Module

Comments

@NobleWolf
Copy link

Is your feature request related to a problem? Please describe.
The Related Alerts module posts a list of related alerts, but it doesn't seem to sort the table before posting it. Here is a screenshot example:
image

Describe the solution you'd like
The table should be sorted by date/time for simpler anlayst consumption.

Describe alternatives you've considered
Rewriting my own enrichment.

Additional context
None

@NobleWolf NobleWolf added the pending-triage Submitted issue needing triage label Jan 3, 2025
@briandelmsft briandelmsft added the module/relatedalerts Related Alerts Module label Jan 3, 2025
@briandelmsft
Copy link
Owner

@NobleWolf this is currently sorted by AlertSeverity (High, Medium, Low, Informational) and the table output to the top 20 alerts (based on that sort) due to comment length limitations.

If we sort just by time, we may end up sorting a bunch of Informational alerts to the top and hide more serious ones in the event of > 20 related alerts.

What do you think of a sort by Severity, than time?. In the case of you're screenshot they are all mediums so it would effectively be a date sort... but if it's mixed severity, the highs will still rise to the top, even if they are not the most recent

@piaudonn
Copy link
Collaborator

piaudonn commented Jan 5, 2025

Could we do some HTML5 tag table trickery to allow sorting in the output?

@briandelmsft
Copy link
Owner

@piaudonn do you think that is feasible? Most times we've tried any advanced html it hasn't really worked out consistently between the two interfaces (Azure Portal / XDR)

@briandelmsft briandelmsft added enhancement Enhancement to existing module and removed pending-triage Submitted issue needing triage labels Jan 6, 2025
@NobleWolf
Copy link
Author

NobleWolf commented Jan 7, 2025

Could we do some HTML5 tag table trickery to allow sorting in the output?

@piaudonn oh that'd be great if it works!

@briandelmsft okay, that sorting makes good sense, but what if there was some additional sub sorting within the Severity levels so that the most recent of each AlertSeverity appeared first. Could it be done with a case statement like this?

SecurityAlert
| where TimeGenerated >= ago(90d)
| where Entities contains "[email protected]"
| order by case(AlertSeverity == "High", 1, AlertSeverity == "Medium", 2, AlertSeverity == "Low", 3, 4) asc, TimeGenerated desc
| take 20

Or maybe after you get the top 20 by severity then just order the remaining by TimeGenerated newest?

I think either would be good, but having some sort of time based sorting is good for our brains.

I might suggest also noting the sorting pattern somewhere for SOC analyst's consumption.
One of our SOC members just read this comment thread and had a suggestion:

I had no idea it was sorting on severity. Maybe flag that with a star or something to indicate that's the sort column? or make it first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing module module/relatedalerts Related Alerts Module
Projects
None yet
3 participants