JamieMagee.MicrosoftSecurityUpdates.Client 0.2.0

dotnet add package JamieMagee.MicrosoftSecurityUpdates.Client --version 0.2.0
                    
NuGet\Install-Package JamieMagee.MicrosoftSecurityUpdates.Client -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JamieMagee.MicrosoftSecurityUpdates.Client" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JamieMagee.MicrosoftSecurityUpdates.Client" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="JamieMagee.MicrosoftSecurityUpdates.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JamieMagee.MicrosoftSecurityUpdates.Client --version 0.2.0
                    
#r "nuget: JamieMagee.MicrosoftSecurityUpdates.Client, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JamieMagee.MicrosoftSecurityUpdates.Client@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JamieMagee.MicrosoftSecurityUpdates.Client&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=JamieMagee.MicrosoftSecurityUpdates.Client&version=0.2.0
                    
Install as a Cake Tool

Microsoft Security Updates Client

GitHub Workflow Status NuGet Package Version NuGet Package Downloads MIT License

An unofficial .NET API client for the MSRC CVRF API

Usage

There are two main ways to use this client:

  • Dependency Injection
  • Manual Instantiation

Dependency Injection

To use the client with dependency injection, register it in your IServiceCollection:

using JamieMagee.MicrosoftSecurityUpdates.Client;

// In Program.cs
builder.Services.AddMicrosoftSecurityUpdatesClient();

// Or with custom HttpClient configuration
builder.Services.AddMicrosoftSecurityUpdatesClient(httpClient =>
{
    // Add custom headers, configure policies, etc.
    httpClient.Timeout = TimeSpan.FromSeconds(30);
});

Then inject IMicrosoftSecurityUpdatesClient into your services:

public class SecurityService
{
    private readonly IMicrosoftSecurityUpdatesClient _client;

    public SecurityService(IMicrosoftSecurityUpdatesClient client)
    {
        _client = client;
    }

    public async Task<IEnumerable<Update>> GetLatestUpdatesAsync()
    {
        return await _client.GetUpdatesAsync();
    }

    public async Task<CvrfDocument> GetSecurityBulletinAsync(string id)
    {
        return await _client.GetCvrfByIdAsync(id);
    }
}

Manual Instantiation

You can also create instances manually:

// Using default HttpClient
using var client = new MicrosoftSecurityUpdatesClient();

// Using your own HttpClient (for advanced scenarios)
using var httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromSeconds(30);
var client = new MicrosoftSecurityUpdatesClient(httpClient);

// Get updates
var updates = await client.GetUpdatesAsync();

License

All packages in this repository are licensed under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 138 6/30/2025
0.1.2 144 3/2/2023
0.0.0-alpha.0.10 82 2/16/2023
0.0.0-alpha.0.8 85 2/16/2023