Skip to content

Conversation

@v-sabiraj
Copy link
Contributor

This pull request simplifies and unifies the anomaly detection logic in two analytic rule queries by lowering the threshold for event per second (eps) filtering and removing redundant code blocks. The main impact is that both rules now use a single eps threshold, making the logic more consistent and easier to maintain.

Query simplification and threshold unification:

  • Lowered the eps threshold from > 1000 and between (501 .. 1000) to a single condition > 500 in both AnomalyFoundInNetworkSessionTraffic.yaml and DetectPortMisuseByAnomalyBasedDetection.yaml, streamlining the detection logic. [1] [2]

  • Removed duplicate and redundant query blocks that previously handled different eps ranges, reducing code complexity and improving maintainability. [1] [2] Required items, please complete

    Change(s):

    • See guidance below

    Reason for Change(s):

    • See guidance below

    Version Updated:

    • Required only for Detections/Analytic Rule templates
    • See guidance below

    Testing Completed:

    • See guidance below

    Checked that the validations are passing and have addressed any issues that are present:

    • See guidance below

Guidance <- remove section before submitting


Before submitting this PR please ensure that you have read the following sections and filled out the changes, reason for change and testing complete sections:

Thank you for your contribution to the Microsoft Sentinel Github repo.

Details of the code changes in your submitted PR. Providing descriptions for pull requests ensures there is context to changes being made and greatly enhances the code review process. Providing associated Issues that this resolves also easily connects the reason.

Change(s):

  • Updated syntax for XYZ.yaml

Reason for Change(s):

Version updated:

  • Yes
  • Detections/Analytic Rule templates are required to have the version updated

The code should have been tested in a Microsoft Sentinel environment that does not have any custom parsers, functions or tables, so that you validate no incorrect syntax and execution functions properly. If your submission requires a custom parser or function, it must be submitted with the PR.

Testing Completed:

  • Yes/No/Need Help

Note: If updating a detection, you must update the version field.

Before the submission has been made, please look at running the KQL and Yaml Validation Checks locally.
https://github.com/Azure/Azure-Sentinel#run-kql-validation-locally

Checked that the validations are passing and have addressed any issues that are present:

  • Yes/No/Need Help

Note: Let us know if you have tried fixing the validation error and need help.

References:


Reduced the 'eps' threshold from 1000 to 500 in both AnomalyFoundInNetworkSessionTraffic.yaml and DetectPortMisuseByAnomalyBasedDetection.yaml to increase sensitivity of anomaly detection in network session traffic.
Bump solution version to 3.0.8 in mainTemplate.json and update all relevant workbook and analytics rule descriptions. Add 3.0.8.zip package file. Minor improvements to JSON formatting, connectorId ordering, and customDetails/alertDetailsOverride property order for consistency.
@v-sabiraj v-sabiraj requested review from a team as code owners September 12, 2025 09:27
@contentautomationbot
Copy link

Hello how are you I am GitHub bot
😀😀
I see that you changed templates under the detections/analytic rules folder. Did you remember to update the version of the templates you changed?
If not, and if you want customers to be aware that a new version of this template is available, please update the version property of the template you changed.

Updated the version field from 1.2.0 to 1.2.1 in AnomalyFoundInNetworkSessionTraffic.yaml and DetectPortMisuseByAnomalyBasedDetection.yaml to reflect recent changes.
@vakohl vakohl merged commit 923f866 into master Oct 3, 2025
35 checks passed
@v-shukore v-shukore added the Solution Solution specialty review needed label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Solution Solution specialty review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants