Skip to content

Update .NET template security warning to mention arbitrary code execution#51934

Merged
gewarren merged 3 commits intomainfrom
copilot/update-template-warning-message
Feb 25, 2026
Merged

Update .NET template security warning to mention arbitrary code execution#51934
gewarren merged 3 commits intomainfrom
copilot/update-template-warning-message

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

The existing warning understated the security risk—templates can execute arbitrary code beyond just MSBuild, so the message needed broadening.

Changes

  • Updated the [!WARNING] callout in both custom-templates.md and dotnet-new-install.md:

    Before: Templates can run MSBuild code when triggered, don't install or run untrusted .NET templates.

    After: Templates can run MSBuild code and other arbitrary code when triggered, don't install or run untrusted .NET templates.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Internal previews

📄 File 🔗 Preview link
docs/core/tools/custom-templates.md Custom templates for dotnet new
docs/core/tools/dotnet-new-install.md dotnet new install

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Update warning message for .NET templates Update .NET template security warning to mention arbitrary code execution Feb 25, 2026
@marcpopMSFT marcpopMSFT marked this pull request as ready for review February 25, 2026 19:11
Copilot AI review requested due to automatic review settings February 25, 2026 19:11
@marcpopMSFT marcpopMSFT requested a review from a team as a code owner February 25, 2026 19:11
Copy link
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

This pull request updates security warning messages in .NET template documentation to more accurately reflect the scope of security risks. The change emphasizes that templates can execute arbitrary code beyond just MSBuild code, providing a clearer and more comprehensive warning to users about the potential dangers of installing untrusted templates.

Changes:

  • Updated security warning text from "Templates can run MSBuild code when triggered" to "Templates can run MSBuild code and other arbitrary code when triggered" in both documentation files

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/core/tools/dotnet-new-install.md Updated WARNING callout to include "and other arbitrary code" in the security warning about template execution
docs/core/tools/custom-templates.md Updated WARNING callout to include "and other arbitrary code" in the security warning about template execution

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gewarren gewarren enabled auto-merge (squash) February 25, 2026 19:23
@gewarren gewarren merged commit f69a138 into main Feb 25, 2026
11 checks passed
@gewarren gewarren deleted the copilot/update-template-warning-message branch February 25, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants