Add BA2008 EnableControlFlowGuard suppression for aapt2.exe #10390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a Guardian Detection Network (GDN) suppression for the BA2008 BinSkim security rule targeting the
aapt2.exebinary in the Microsoft Android SDK Windows package.Background
BA2008 is a BinSkim security analysis rule that checks whether Windows binaries have Control Flow Guard (CFG) enabled. CFG is a security mitigation feature that helps prevent memory corruption attacks by restricting where applications can execute code from.
Issue
The security scan was flagging
aapt2.exelocated atbin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/35.0.78/tools/aapt2.exefor not having Control Flow Guard enabled.Solution
Added a suppression entry in
.gdn/.gdnsuppresswith:aapt2.exeat the specific pathbin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/35.0.78/tools/aapt2.exeChanges
This suppression is appropriate because
aapt2.exeis a tool from the Android SDK build tools provided by Google, not a binary we compile or control directly. The lack of CFG in this third-party tool is not a security concern for the .NET for Android project itself.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.