-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ms_defender: Improve reliability and error handling #11898
ms_defender: Improve reliability and error handling #11898
Conversation
DryRun Security SummaryThe PR enhances the MS Defender parser by implementing data sanitization, safer dictionary access, and improved endpoint creation validation, along with corresponding unit tests to ensure more robust handling of scan results. Expand for full summaryThe PR updates the MS Defender parser and adds a corresponding unit test to improve error handling and parsing robustness for Microsoft Defender scan results. Security findings include:
No additional critical security vulnerabilities were identified in the patch. Code AnalysisWe ran |
@manuel-sommer Could you review this PR? |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
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.
looks good to me
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.
Approved
Fixes #11896
Exceptions such as KeyErrors were silently swallowed leading to endpoints not being created for findings.
This PR:
.get
to retrieve values from the dict/json objectdefenderAvStatus
field.I tried to remove the
str()
wrappers everywhere, but it seems they are needed to handle the "" vs null vs None cases with these json reports. So I left them for now.