Eternal.PackageCheck
2.2.7
dotnet tool install --global Eternal.PackageCheck --version 2.2.7
dotnet new tool-manifest
dotnet tool install --local Eternal.PackageCheck --version 2.2.7
#tool dotnet:?package=Eternal.PackageCheck&version=2.2.7
nuke :add-package Eternal.PackageCheck --version 2.2.7
Eternal Package Checker
Eternal.PackageCheck NuGet library package
Copyright Eternal Developments, LLC. All Rights Reserved.
License
MIT
Functionality
This utility checks the meta data associated with a given package and optional version. It also lists all the first order dependencies with their licenses, and any CVEs found for the package using https://osv.dev/ and the https://nvd.nist.gov/ APIs. The dependency pins are properly respected e.g. if a package depends on a specific version of another package, that will be reported correctly. This can be helpful when filling in corporate approval forms and when you wish to make sure all the correct fields are set in your published package.
Installation for Windows 11 and Ubuntu Raccoon: dotnet tool install --global Eternal.PackageCheck
It supports the following four ecosystems:
- RubyGems e.g. rubygems bcrypt
- NuGet e.g. nuget Eternal.ConsoleUtilities
- Go e.g. go golang.org/x/sys
- npm e.g. npm is-obj
- Python e.g. pypi hypercorn
- Cargo e.g. cargo serde
- Debian e.g. deb libcurl4t64
Debian packages are looked up in the Debian archive (https://api.ftp-master.debian.org/ and https://snapshot.debian.org/). With no version, the version in stable is used. The licenses and copyright come from the 'Files: *' paragraph of the package's machine-readable copyright file; a package with a free-form copyright file reports no licenses. The dependencies listed are the source package's build dependencies, as the run time dependencies of a binary package are not available through any API. A purl from a derivative distribution such as Ubuntu is still looked up in the Debian archive. CVEs are looked up against the source package, and only for the Debian release the version belongs to (e.g. Debian:13), which is taken from the suite that carries it or from a "+debNN" or "~bpoNN" suffix in its version. An older version that can be placed in no release reports CVEs from every release.
It is designed to be strict when detecting licenses - please let me know if you find a false positive.
The utility makes some GitHub and GitLab API calls. For those you'll need to set up a Personal Access Token for each provider and set an environment variable to each one.
GITHUB_PAT=github_pat_11BF*************D5xsl_gkQeLZidP2t*****************RM2NVZ****gfl
GITLAB_PAT=glpat-pkD8J**********EV9WJfGM**********TpvdjFheA8.01.170****lv
Listing only the dependencies an application consumes
By default every dependency of a package is listed. Add --target-framework <framework> to list only the dependencies that an application targeting that framework
consumes, e.g. PackageCheck nuget Azure.Data.Tables --target-framework net481
- NuGet does not merge the dependency groups of a package. It picks the single nearest group that the application's framework can consume and ignores the rest.
- e.g. for
net481, thenet10.0,net8.0, andnetstandard2.0groups of Azure.Data.Tables are reduced tonetstandard2.0. - A group that names no framework (
AnyFramework) is the old flat dependency list. It is used only when no group matches the framework. - The choice matches NuGet's own, including the preference for a group for the application's own framework over
.NET Standard.
- e.g. for
- Development and build dependencies are dropped for every ecosystem, as an application that uses a package never installs them.
- Dependencies that are dropped are not looked up, which saves a request for each of them.
- The option also applies to an SBOM, e.g.
PackageCheck cyclonedx myget.cdx.json --target-framework net481 - The framework is a short name such as
net481,net8.0,netstandard2.0, ornetcoreapp3.1. The case is ignored and the dots are optional, sonet80isnet8.0.- The names that are accepted are the members of the
ETargetFrameworkenum, so a newer .NET has to be added there (and toEDependencyType) before it can be used. - A platform specific name such as
net8.0-windowsis not accepted.
- The names that are accepted are the members of the
Looking up the license from a Repo
- The root folder (and only the root folder) of the repo is interrogated for a list of files.
- Any file that has 'license', 'licence', 'COPYING', 'Copyright', or 'BSDL' is a candidate file. The name check is case insensitive.
- e.g. These files will be determined to be candidate files 'MIT-LICENSE', 'License.txt', 'BSD-Licence'
- The text version of the file (not the decorated HTML version) is downloaded.
- The file contents are sanitized.
- This means all carriage returns, new lines, and tabs are converted to spaces.
- Any smart quotes are replaced with vanilla quotes.
- All double spaces are converted to single spaces.
- The starting words and the ending words of the license are searched for in a case insensitive fashion.
- If both the above exist, then key phrases from the license are looked for.
- This is to account for when the license is changed (for example) from 'AUTHORS' to 'Company, LLC'
- If all the phrases are found, then the license matches and the HTML link is set.
- The pre-sanitized license contents are stored in the TPS file.
Looking up the copyright from the license contents
- The license and license contents are validated to ensure consistency.
- All words between 'Copyright' and the start of the license boilerplate text are extracted.
- This is sanitized and set as the copyright message.
Licenses that are detected
a.k.a. Licenses with the meta data setup
The meta data is externalized - you can edit LicenseBoilerPlate.json and LicensePriorities.json to add new licenses.
MIT ISC MIT-0 BSD-3-Clause BSD-2-Clause 0BSD Apache-2.0 PSF-2.0 BlueOak-1.0.0 Ms-PL MPL-2.0 - no copyright extraction CC0-1.0 - no copyright extraction CC-BY-4.0 - no copyright extraction Ruby - converted to the BSD-2-Clause WTFPL Hippocratic-2.1 LGPL-2.0-only - WIP LGPL-2.0-or-later - WIP LGPL-2.1-only - WIP LGPL-2.1-or-later - WIP LGPL-3.0-only - WIP LGPL-3.0-or-later - WIP GPL-2.0-only - WIP GPL-2.0-or-later - WIP GPL-3.0-only - WIP GPL-3.0-or-later - WIP RPL-1.5 - WIP
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.7 | 8 | 11/16/2026 |
| 2.2.6 | 13 | 11/16/2026 |
| 2.2.5 | 44 | 11/16/2026 |
| 2.2.4 | 53 | 11/12/2026 |
| 2.2.3 | 107 | 11/5/2026 |
| 2.2.2 | 127 | 10/24/2026 |
| 2.2.1 | 106 | 10/23/2026 |
| 2.1.1 | 102 | 10/23/2026 |
| 2.0.1 | 112 | 10/15/2026 |
| 1.0.17 | 107 | 10/14/2026 |
| 1.0.16 | 105 | 10/6/2026 |
| 1.0.15 | 105 | 9/29/2026 |
| 1.0.14 | 96 | 9/29/2026 |
| 1.0.13 | 116 | 9/23/2026 |
| 1.0.12 | 126 | 9/10/2026 |
| 1.0.11 | 144 | 9/9/2026 |
| 1.0.10 | 147 | 9/7/2026 |
| 1.0.9 | 121 | 9/4/2026 |
| 1.0.8 | 126 | 9/4/2026 |
| 1.0.7 | 124 | 8/31/2026 |