Skip to content

Enable Control Flow Guard for dotnet-aot project#54171

Merged
JeremyKuhne merged 1 commit intodotnet:mainfrom
JeremyKuhne:enable-cfg-dotnet-aot
May 4, 2026
Merged

Enable Control Flow Guard for dotnet-aot project#54171
JeremyKuhne merged 1 commit intodotnet:mainfrom
JeremyKuhne:enable-cfg-dotnet-aot

Conversation

@JeremyKuhne
Copy link
Copy Markdown
Member

The dotnet-aot Native AOT project did not have Control Flow Guard enabled. Enable it by setting <ControlFlowGuard>Guard</ControlFlowGuard>, per the Native AOT security guidance.

The dotnet-aot Native AOT project did not have ControlFlowGuard enabled. Enable it per the Native AOT security guidance.
Copilot AI review requested due to automatic review settings May 4, 2026 17:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Control Flow Guard (CFG) for the dotnet-aot NativeAOT project to align with Native AOT security guidance and harden the produced Windows binaries.

Changes:

  • Adds <ControlFlowGuard>Guard</ControlFlowGuard> to dotnet-aot.csproj.

Comment thread src/Cli/dotnet-aot/dotnet-aot.csproj
@JeremyKuhne JeremyKuhne enabled auto-merge (squash) May 4, 2026 17:54
@JeremyKuhne
Copy link
Copy Markdown
Member Author

/ba-g flaky watcher test: Microsoft.DotNet.Watch.UnitTests.FileWatcherTests.DeleteSubfolder(usePolling: False)

@JeremyKuhne JeremyKuhne merged commit 7bfcbfa into dotnet:main May 4, 2026
27 of 29 checks passed
@JeremyKuhne JeremyKuhne deleted the enable-cfg-dotnet-aot branch May 4, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants