Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 7, 2025

This PR adds a Guardian Detection Network (GDN) suppression for the BA2008 BinSkim security rule targeting the aapt2.exe binary 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.exe located at bin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/35.0.78/tools/aapt2.exe for not having Control Flow Guard enabled.

Solution

Added a suppression entry in .gdn/.gdnsuppress with:

  • Rule: BA2008 EnableControlFlowGuard
  • Target: aapt2.exe at the specific path bin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/35.0.78/tools/aapt2.exe
  • Justification: This is a third-party binary from Google's Android SDK that we don't control and may not have CFG enabled by design

Changes

  • Added suppression entry with appropriate signature hash following repository conventions
  • Updated suppression set timestamp to reflect the change
  • Validated JSON format integrity

This suppression is appropriate because aapt2.exe is 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.

- Added specific suppression entry for BA2008 security rule targeting aapt2.exe
- Binary path: bin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/35.0.78/tools/aapt2.exe
- Justification: Third-party binary from Google Android SDK that may not have CFG enabled
- Updated suppression set timestamp to reflect change
- Validated JSON format integrity

Co-authored-by: Aguilex <[email protected]>
Copilot AI changed the title [WIP] Suppress BA2008: EnableControlFlowGuard for aapt2.exe in .gdnsuppress Add BA2008 EnableControlFlowGuard suppression for aapt2.exe Aug 7, 2025
Copilot AI requested a review from Aguilex August 7, 2025 21:21
@Aguilex Aguilex marked this pull request as ready for review August 8, 2025 12:59
@jonathanpeppers
Copy link
Member

We can ignore the test failure: [BT : 1.17.0] error : Installation of the app failed.

@jonathanpeppers jonathanpeppers merged commit 6d7a392 into main Aug 8, 2025
57 of 59 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-6303fbdf-a238-4a10-9904-6cff1b2c75bb branch August 8, 2025 13:31
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants