[Cherry-Pick] Windows ML: Enable Control Flow Guard for cpp-abi sample (BinSkim BA2008) - #653
Merged
Kyaw Thant (kythant) merged 1 commit intoJul 2, 2026
Conversation
CppAbiEPEnumerationSample.exe was built without Control Flow Guard, tripping BinSkim BA2008 (error severity) in the WindowsAppSDK SamplesCompat SDL gate (Guardian: Post Analysis) once the temporary .gdnsuppress waiver (Bug 60433419) expired on 2026-06-30. Set <ControlFlowGuard>Guard</ControlFlowGuard> so cl receives /guard:cf and link receives /GUARD:CF, matching the other WindowsML C++ samples that already pass BA2008. (cherry picked from commit 26eddcd)
Kyaw Thant (kythant)
marked this pull request as ready for review
July 2, 2026 20:46
Lauren Ciha (lauren-ciha)
approved these changes
Jul 2, 2026
Kyaw Thant (kythant)
deleted the
user/kythant/winml-cppabi-enable-cfg-main
branch
July 2, 2026 23:51
agniuks
added a commit
that referenced
this pull request
Jul 21, 2026
#656) CppAbiEPEnumerationSample.exe was built without Control Flow Guard, tripping BinSkim BA2008 (error severity) in the WindowsAppSDK SamplesCompat SDL gate (Guardian: Post Analysis) once the temporary .gdnsuppress waiver (Bug 60433419) expired on 2026-06-30. Set <ControlFlowGuard>Guard</ControlFlowGuard> so cl receives /guard:cf and link receives /GUARD:CF, matching the other WindowsML C++ samples that already pass BA2008. (cherry picked from commit 26eddcd) (cherry picked from commit c4bd030) Co-authored-by: Kyaw Thant <48363984+kythant@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Cherry-pick of #648 (commit
26eddcdf) tomain.Enables Control Flow Guard on the Windows ML
cpp-abisample (CppAbiEPEnumerationSample) so it satisfies SDL/BinSkim BA2008 (EnableControlFlowGuard).Why
mainhas thecpp/Directory.Build.propsCFG block (from #577) that covers thecpp/samples, but the separatecpp-abiproject (which is not undercpp/and doesn't inherit those props) was never given CFG onmain. #648 fixed it onrelease/experimental; this bringsmainto parity.Change
Adds
<ControlFlowGuard>Guard</ControlFlowGuard>to the project's<ClCompile>; the C++ targets propagate it to the compiler (/guard:cf) and linker (/GUARD:CF).Cherry-picked from
26eddcdf(PR #648).