Skip to content

Add warning to only load trusted models#53999

Open
svick wants to merge 1 commit into
mainfrom
svick-model-loading-note
Open

Add warning to only load trusted models#53999
svick wants to merge 1 commit into
mainfrom
svick-model-loading-note

Conversation

@svick
Copy link
Copy Markdown
Member

@svick svick commented May 22, 2026

ML.NET assumes that loaded models are trusted. We should explicitly document this assumption and warn users not to load untrusted models.

Companion PR to change API docs: dotnet/machinelearning#7611


Internal previews

📄 File 🔗 Preview link
docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net.md docs/machine-learning/how-to-guides/save-load-machine-learning-models-ml-net

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

This PR adds a security warning to the ML.NET “save and load trained models” guide to remind readers to load model files only from trusted sources.

Changes:

  • Adds an [!IMPORTANT] admonition under “Load a model stored locally” warning about the security risks of loading untrusted models.

Comment on lines +94 to +96
> [!IMPORTANT]
>
> Only load models from trusted sources. Loading models from untrusted sources is a security risk.
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.

2 participants