-
Notifications
You must be signed in to change notification settings - Fork 2
Build v2.3 - Multiple Enhancements including mailMessage processing #231
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
Conversation
briandelmsft
commented
Dec 3, 2025
- Fixes MailMessage Enrichment #54
- Fixes Surface the onPremisesSyncEnabled #141
- Fixes Remove cryptography module pinning #186
- Fixes Upgrade to Python 3.12 #187
- Fixes 500 Series Error Retries #198
- Fixes Update Function Extension Bundle #199
- Fixes Add logging messages to each module #204
- Fixes Error Handling: Add token check to base module to ensure at least the minimal permissions are present #206
- Fixes Logging Enhancement: Incident changes such as Comments, tags and tasks silently fail without any logging #209
- Fixes Debug Module - Comment, task, tag improvements #213
- Fixes Scoring Module: Accept strings for ModuleBody #219
- Fixes BUG - Exchange Module throws exception when OOF is scheduled #220
- Fixes Possible Exception when Filename contains more than just a file name #221
Merge with changes in main
Add mailMessage Entity Handling
Additional logging and error handling, updates for 3.10 builds
…STAT-Function into build_v2_2_update1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces version 2.3 of STAT with significant enhancements focused on mail message processing, improved error handling, and better logging capabilities across all modules. The changes fix 13 issues and introduce comprehensive support for MailMessage entities throughout the codebase.
Key Changes
- MailMessage Entity Support: Complete implementation of mail message entity processing, enrichment via Microsoft Graph API, and integration into KQL queries and incident comments
- Enhanced Error Handling: New exception classes (
STATServerError,STATFailedToDecodeToken,STATInsufficientPermissions) and improved retry logic with logging for API calls - Logging Improvements: Added structured logging across all modules to track invocations and API failures
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 26 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/base.py | Adds mail message enrichment, permission checks, and reformats incident comments with improved HTML structure |
| classes/init.py | Introduces new exception classes and adds MailMessages/CreatedTime properties to BaseModule with supporting KQL methods |
| shared/rest.py | Enhances error handling with server error retries, adds permission validation functions, and implements logging throughout |
| shared/data.py | Adds ISO 8601 datetime conversion utility with timezone handling |
| modules/kql.py | Integrates mail entities into KQL query generation |
| modules/exchange.py | Improves OOF date parsing with exception handling and adds message trimming |
| modules/scoring.py | Adds JSON string parsing support for ModuleBody |
| tests/test_stat_base.py | Adds assertions for MailMessages count validation |
| tests/test_rest.py | Adds tests for new permission checking functions |
| tests/test_data.py | Adds comprehensive datetime conversion tests |
| host.json | Updates extension bundle from v3 to v4 |
| requirements.txt | Removes cryptography version constraint |
| debug/debug.py | Adds debug functions for comment, task, and tag operations |
| .vscode/* | Updates launch and task configurations for improved debugging |
| .github/workflows/stat_function_build.yml | Modifies pip install to use Linux-compatible binaries |
| README.md | Updates AZURE_AUTHORITY_HOST to include protocol |
Comments suppressed due to low confidence (3)
modules/base.py:277
- Except block directly handles BaseException.
except:
modules/exchange.py:124
- Except block directly handles BaseException.
except:
shared/rest.py:475
- Except block directly handles BaseException.
except:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
piaudonn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫰


