Chainguard Libraries for .NET overview
Learn about Chainguard Libraries for .NET, providing enhanced security for NuGet dependencies
For the complete documentation index, see llms.txt.
.NET package consumption in a large organization is typically managed by a repository manager. The repository manager acts as a single point of access for developers and development tools to retrieve NuGet packages.
This page describes how to configure JFrog Artifactory and Sonatype Nexus Repository to proxy Chainguard Libraries for .NET. The instructions use Chainguard Repository’s built-in upstream fallback, which is the recommended configuration.
With upstream fallback enabled, configure Artifactory with a single remote repository that points to the Chainguard NuGet v3 service index: https://libraries.cgr.dev/dotnet/v3/index.json.
Chainguard Repository handles upstream fallback and policy enforcement. Artifactory handles local caching, access control, and the endpoint used by your NuGet clients. Do not add a direct nuget.org remote to the virtual repository used by your builds unless you intentionally want to manage fallback yourself.
Before you begin, you need:
JFrog Artifactory supports NuGet repositories for proxying packages and virtual repositories for combining repositories behind a single endpoint.
The following configuration uses the recommended upstream-fallback approach. A remote repository that points directly to nuget.org can bypass Chainguard Repository protections. Because Artifactory resolves packages through a virtual repository, a misplaced or incorrectly ordered remote can result in an unprotected package being served without an obvious build error.
Use the following steps to add Chainguard Libraries for .NET as an Artifactory remote repository:
dotnet-chainguardhttps://libraries.cgr.dev/dotnet/v3/index.jsonchainctlchainctlThese settings are required because Chainguard Libraries stores artifacts behind redirects to pre-signed URLs. Without them, Artifactory may rewrite the redirect, forward credentials to the redirected host, or cache the redirect response instead of the NuGet package.
Create a virtual repository to give NuGet clients a single access point:
dotnet-alldotnet-chainguardFor the recommended configuration, dotnet-chainguard should be the only external upstream in dotnet-all. You can also add approved internal NuGet repositories to the virtual repository according to your organization’s access-control requirements.
Validate the Artifactory remote before configuring developer workstations or CI/CD systems. The Artifactory Test button is not a reliable indicator of a working Chainguard configuration; a remote can pass the test but still be misconfigured for package retrieval.
https://libraries.cgr.dev/dotnet/v3/index.json.dotnet-chainguard if the repository was configured with different settings. dotnet nuget locals all --cleardotnet restore --force --no-cache --verbosity normalobj/project.assets.json. The sources entry must contain the Artifactory dotnet-all URL, and must not contain nuget.org.dotnet-chainguard remote cache and that the request is available through the dotnet-all virtual repository.After validation, configure each workstation and build server that restores .NET dependencies, including CI/CD infrastructure, to use the Artifactory virtual repository.
In Artifactory, select the dotnet-all virtual repository and use Set Me Up or Generate Settings to obtain the URL and authentication instructions for your Artifactory version. The URL commonly has the following form: https://<artifactory-host>/artifactory/api/nuget/dotnet-all
See Configuring your build tool for more information.
Sonatype Nexus Repository allows for merging multiple remote repositories as a repository group. The following instructions are based on the Nexus documentation for NuGet.
The recommended approach is to rely on Chainguard Repository’s upstream fallback, configuring a single proxy repository pointed at the Chainguard NuGet v3 service index rather than adding a separate nuget.org proxy. A proxy that points directly to nuget.org can bypass Chainguard Repository protections.
The following steps create a proxy repository for Chainguard Libraries for .NET and a repository group that exposes it to your build tools.
First, log in to Sonatype Nexus as a user with administrator privileges and access the Server administration and configuration section with the gear icon in the top navigation bar.
Next, configure a proxy repository for the Chainguard Libraries for .NET repository:
dotnet-chainguardNuGet V3https://libraries.cgr.dev/dotnet/v3/index.json.Username as the Authentication type,
and provide the username and password values as retrieved with
chainctl.Create a repository group, or add to an existing repository group:
dotnet-alldotnet-chainguard to the right to include it in the group. Position
dotnet-chainguard at the top of the list using the arrow controls.In a typical configuration, the Chainguard repository is placed first so that
packages are retrieved through Chainguard when available. If you are manually
managing fallback, you can configure an additional nuget.org proxy repository
and add it to the group after dotnet-chainguard.
NuGet v3 clients access a Nexus group through its service index, which commonly
has the form https://repo.example.com/repository/dotnet-all/index.json (with
repo.example.com replaced with the hostname of your repository manager).
See Configuring your build tool for information on setting the package source and authenticating to your repository manager.
Last updated: 2026-09-30 18:36