- Notifications
You must be signed in to change notification settings - Fork7.7k
[release/v7.4] Fallback to AppLocker afterWldpCanExecuteFile
#25229
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
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.
LGTM!
3e5477f
intoPowerShell:release/v7.4Uh oh!
There was an error while loading.Please reload this page.
microsoft-github-policy-servicebot commentedApr 4, 2025 • edited by unfurl-linksbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by unfurl-linksbot
Uh oh!
There was an error while loading.Please reload this page.
📣 Hey @@TravisEz13, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗https://aka.ms/PSRepoFeedback |
Backport#24912
This pull request includes several changes to the
src/System.Management.Automation/security/wldpNativeMethods.cs
file to improve the handling of system lockdown policies and file policy enforcement. The changes primarily focus on refining the logic for determining enforcement modes and handling exceptions more effectively.Key changes include:
Improvements to system lockdown policy handling:
GetSystemLockdownPolicy
method to use an out parameter forGetDebugLockdownPolicy
.ConvertToModernFileEnforcement
to convert legacy enforcement modes to modern file enforcement modes.Enhancements to file policy enforcement:
GetFilePolicyEnforcement
method to use the newConvertToModernFileEnforcement
method and added logic to handle different enforcement scenarios more accurately.TryGetWldpCanExecuteFileResult
method to handle the result ofWldpCanExecuteFile
and fallback to legacy APIs if necessary.Exception handling improvements:
GetFilePolicyEnforcement
to catch bothDllNotFoundException
andEntryPointNotFoundException
and log the appropriate events.Additional minor changes:
System.Diagnostics
using directive for better debugging support.GetDebugLockdownPolicy
method to use an out parameter for modern enforcement.[1][2][3]These changes collectively enhance the robustness and accuracy of the system's lockdown policy and file enforcement mechanisms.