NuGetDefense.Lib
3.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NuGetDefense.Lib --version 3.0.2
NuGet\Install-Package NuGetDefense.Lib -Version 3.0.2
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="NuGetDefense.Lib" Version="3.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NuGetDefense.Lib" Version="3.0.2" />
<PackageReference Include="NuGetDefense.Lib" />
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 NuGetDefense.Lib --version 3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NuGetDefense.Lib, 3.0.2"
#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.
#addin nuget:?package=NuGetDefense.Lib&version=3.0.2
#tool nuget:?package=NuGetDefense.Lib&version=3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
An MSBuildTask that checks for known vulnerabilities. Inspired by OWASP SafeNuGet.
Docs
View the full documentation for NuGetDefense here
3.x preview documentation can be found by running dotnet /path/to/NuGetDefense.dll -?
Features
- Uses Multiple Sources to check for known vulnerabilities in third-party libraries (NuGet packages)
- OSS Index
- National Vulnerability Database (Optionally Self-Updating)
- GitHub Security Advisory Database
- Google's Open Source Vulnerabilities Database (Coming Soon!)
- Simple installation/configuration: the NuGet Package is all you need.
- dotnet Global Tool for those who want to run it manually or just in the CI
- Transitive Dependency Checking
- SDK style projects only (older project format is not supported by the dotnet cli)
- Uses the versions resolved by the dotnet cli at build
- Project Reference Scanning
- Scan all projects in a hierarchy by installing NuGet Defense to the top level package
- Allow breaking the build based on severity of vulnerability.
- Ignore specific vulnerabilities/packages.
- Sensitive/Internal Packages filtering
- Don't send packages that are sensitive/internal to remote vulnerability sources
- Caching to prevent excess calls and hitting rate limits on API's
- Blocklisting NuGet Packages
- Allowlisting NuGet Packages
- MIT Licensed
- Consumable NuGet packages for bundling NuGetDefense scanners into your own software
Requirements
- NuGetDefense v1.x is built only in .Net Core 3.1 so you will need the runtime/SDK installed.
- NuGetDefense v2.x is built only in .Net 5.0 so you will need the runtime/SDK installed. (.Net 5.0 is our of support)
- NuGetDefense v3.x is built only in .Net 6.0 so you will need the runtime/SDK installed.
Unsupported Versions
- Official Support follows support for the underlying framework.
- Supporters can request support of unsupported versions (such as v2.x running on .Net 5) but are advised to use a supported runtime (for better overall security)
- .Net 5 projects can use 3.x as long as the .Net 6 runtime is installed.
How does it work?
NuGetDefense is a bundled dotnet tool that runs using an MSBuild ExecTask after your project finishes building.
Love it? Support it
You can sponsor this project on Github and Patreon. The funds will be used to pay for software licenses and cloud/hardware costs that keep my projects running.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- ByteDev.DotNet (>= 7.2.0)
- Microsoft.Data.Sqlite (>= 6.0.6)
- NuGet.Versioning (>= 6.2.1)
- NuGetDefense.Core (>= 2.0.3)
- NuGetDefense.GitHubAdvisoryDatabase (>= 2.0.0)
- NuGetDefense.NVD (>= 2.0.7)
- NuGetDefense.OSSIndex (>= 2.0.4)
- Serilog.Sinks.Console (>= 4.0.1)
- Serilog.Sinks.File (>= 5.0.0)
- System.CommandLine (>= 2.0.0-beta1.21308.1)
- System.Text.Json (>= 6.0.5)
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 |
---|---|---|
4.1.4-prerelease | 93 | 2 months ago |
4.1.3.1 | 139 | 9 months ago |
4.1.3 | 115 | 6/1/2024 |
4.1.2 | 97 | 5/22/2024 |
4.1.0 | 89 | 5/14/2024 |
4.1.0-pre0002 | 93 | 4/25/2024 |
4.1.0-pre0001 | 114 | 4/17/2024 |
4.0.5 | 169 | 4/25/2024 |
4.0.4 | 138 | 3/16/2024 |
4.0.3 | 142 | 3/3/2024 |
4.0.2 | 147 | 2/25/2024 |
4.0.1 | 164 | 2/14/2024 |
4.0.0-prerelase1 | 177 | 12/20/2023 |
3.2.5 | 129 | 4/25/2024 |
3.2.4 | 133 | 3/16/2024 |
3.2.3 | 143 | 3/3/2024 |
3.2.2 | 130 | 2/25/2024 |
3.2.1 | 121 | 2/14/2024 |
3.2.0 | 243 | 12/14/2023 |
3.2.0-prerelease7 | 132 | 12/13/2023 |
3.2.0-prerelease6 | 174 | 7/30/2023 |
3.2.0-prerelease4 | 138 | 6/16/2023 |
3.2.0-prerelease2 | 168 | 6/3/2023 |
3.2.0-prerelease | 160 | 5/13/2023 |
3.1.1 | 290 | 3/24/2023 |
3.1.0 | 213 | 3/24/2023 |
3.0.11.1 | 263 | 3/6/2023 |
3.0.11 | 242 | 3/5/2023 |
3.0.10 | 324 | 1/15/2023 |
3.0.9 | 319 | 12/11/2022 |
3.0.8 | 716 | 10/30/2022 |
3.0.7 | 452 | 7/19/2022 |
3.0.5 | 468 | 7/7/2022 |
3.0.4 | 470 | 6/26/2022 |
3.0.3 | 152 | 6/22/2022 |
3.0.2 | 142 | 6/16/2022 |
3.0.1 | 178 | 2/27/2022 |
3.0.0 | 172 | 1/22/2022 |
3.0.0-pre0017 | 183 | 11/17/2021 |
3.0.0-pre0012 | 258 | 11/6/2021 |
3.0.0-pre0011 | 169 | 11/1/2021 |
3.0.0-pre0007 | 271 | 10/16/2021 |
3.0.0-pre0006 | 166 | 9/30/2021 |
3.0.0-pre0004 | 174 | 8/10/2021 |
3.0.0-pre0002 | 166 | 8/5/2021 |
3.0.0-pre0001 | 241 | 7/30/2021 |