Skip to main content

How to fix NuGet vulnerabilities with GitHub Copilot in Visual Studio

Security vulnerabilities in your dependencies are one of those things where I know that I should address them promptly, but the process of hunting down the right package version, understanding the scope of the issue, and making the change without breaking anything can turn a five-minute fix into a frustrating rabbit hole. With the Visual Studio March 2026 update, that workflow just got a whole lot smoother.

GitHub Copilot can now help you fix NuGet package vulnerabilities directly from Solution Explorer, turning what used to be a manual research task into a guided, in-editor experience.

What's new?

When Visual Studio detects a vulnerability in one of your NuGet packages, you'll now see a Fix with GitHub Copilot link alongside the vulnerability notification in Solution Explorer. One click is all it takes to kick off the process: Copilot analyzes the vulnerability, identifies the appropriate dependency updates, and implements them for you — without disrupting the rest of your project.

No more context-switching to security advisories, no more manually cross-referencing package versions, and no more second-guessing whether your fix might break something else. You stay in the editor, and the issue gets resolved right when it's discovered.

The path of least resistance

The biggest barrier to fixing vulnerabilities quickly isn't usually knowledge — it's friction. Developers know a flagged NuGet package needs attention, but when addressing it requires leaving the IDE, researching advisories, figuring out which version resolves the issue, and validating that the update is compatible with the rest of the dependency tree, it's easy for "I'll fix that later" to become the path of least resistance.

Copilot eliminates most of that friction. By surfacing the fix at the exact moment, the vulnerability is detected in the same tool you're already working in. It makes the secure choice the easy choice.

How to use it

  1. Open your project in Visual Studio 2026 Insiders (the feature is available in the latest Insiders build).
  2. In Solution Explorer, look for any NuGet package flagged with a vulnerability notification.
  3. Click the Fix with GitHub Copilot link in the notification.
  4. Copilot will analyze the vulnerability and recommend targeted dependency updates.
  5. Review the suggested changes and apply them. Copilot handles the implementation while keeping your other packages stable.

That's it. 

Security issues addressed, workflow intact. 

Happy (secure) coding!

More information

Visual Studio March Update - Build Your Own Custom Agents - Visual Studio Blog

Popular posts from this blog

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

VS Code Planning mode

After the introduction of Plan mode in Visual Studio , it now also found its way into VS Code. Planning mode, or as I like to call it 'Hannibal mode', extends GitHub Copilot's Agent Mode capabilities to handle larger, multi-step coding tasks with a structured approach. Instead of jumping straight into code generation, Planning mode creates a detailed execution plan. If you want more details, have a look at my previous post . Putting plan mode into action VS Code takes a different approach compared to Visual Studio when using plan mode. Instead of a configuration setting that you can activate but have limited control over, planning is available as a separate chat mode/agent: I like this approach better than how Visual Studio does it as you have explicit control when plan mode is activated. Instead of immediately diving into execution, the plan agent creates a plan and asks some follow up questions: You can further edit the plan by clicking on ‘Open in Editor’: ...