Update BinSkim BA2008 suppression for aapt2.exe with wildcard pattern and proper justification #10394
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 updates the existing BinSkim BA2008 suppression entry for
aapt2.exein the.gdn/.gdnsuppressfile to address the correct path pattern and provide a more accurate justification.Changes Made
Path Pattern Update
35.0.78/tools/aapt2.exe) to use a wildcard pattern (*/Tools/aapt2.exe)toolstoTools(capital T) to match the actual build output locationImproved Justification
Enhanced the justification text to be more explicit about why EnableControlFlowGuard cannot be enabled:
Before:
After:
Context
The
aapt2.exebinary is a third-party tool provided by Google as part of the Android SDK build tools. Since this is not Microsoft-compiled code, we cannot enable Control Flow Guard (CFG) compilation flags on it. The suppression prevents BinSkim from flagging this as a security issue during automated scanning.The path pattern
bin/Release/dotnet/packs/Microsoft.Android.Sdk.Windows/*/Tools/aapt2.exereflects the actual location where the binary is placed during the build process, where the version folder is dynamically generated based on commit distance.This change aligns the suppression with the actual build output structure and provides clear documentation of why this third-party binary cannot support CFG.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.