Disable AMSI content logging in release#26235
Conversation
|
WG conclusion was to remove the code at all. |
Removing the test code only in release builds seems consistent with the intent of the WG’s decision. |
There was a problem hiding this comment.
Pull Request Overview
This PR disables AMSI (Anti-Malware Scan Interface) content logging in release builds by wrapping debug-only code in #if DEBUG directives. This addresses performance and security concerns where environment variable-based debugging features should not be active in production releases.
Key changes:
- Wrapped the
DumpLogAMSIContentlazy initialization in#if DEBUG - Wrapped all console logging statements and the generic exception handler that reference
DumpLogAMSIContentin#if DEBUG
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@TravisEz13 Do you think we should keep this in debug, or remove completely? |
SydneyhSmith
left a comment
There was a problem hiding this comment.
reviewed by security WG
|
@iSazonov Please approve workflows. |
|
@powershell/WG-Security approved for merge into master |
Fix #21497 (comment)