Eternal.PackageCheck 2.2.7

dotnet tool install --global Eternal.PackageCheck --version 2.2.7
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Eternal.PackageCheck --version 2.2.7
                    
This package contains a .NET tool you can call from the shell/command line.
#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:

  1. RubyGems e.g. rubygems bcrypt
  2. NuGet e.g. nuget Eternal.ConsoleUtilities
  3. Go e.g. go golang.org/x/sys
  4. npm e.g. npm is-obj
  5. Python e.g. pypi hypercorn
  6. Cargo e.g. cargo serde
  7. 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

  1. 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.
    1. e.g. for net481, the net10.0, net8.0, and netstandard2.0 groups of Azure.Data.Tables are reduced to netstandard2.0.
    2. A group that names no framework (AnyFramework) is the old flat dependency list. It is used only when no group matches the framework.
    3. The choice matches NuGet's own, including the preference for a group for the application's own framework over .NET Standard.
  2. Development and build dependencies are dropped for every ecosystem, as an application that uses a package never installs them.
  3. Dependencies that are dropped are not looked up, which saves a request for each of them.
  4. The option also applies to an SBOM, e.g. PackageCheck cyclonedx myget.cdx.json --target-framework net481
  5. The framework is a short name such as net481, net8.0, netstandard2.0, or netcoreapp3.1. The case is ignored and the dots are optional, so net80 is net8.0.
    1. The names that are accepted are the members of the ETargetFramework enum, so a newer .NET has to be added there (and to EDependencyType) before it can be used.
    2. A platform specific name such as net8.0-windows is not accepted.

Looking up the license from a Repo

  1. The root folder (and only the root folder) of the repo is interrogated for a list of files.
  2. Any file that has 'license', 'licence', 'COPYING', 'Copyright', or 'BSDL' is a candidate file. The name check is case insensitive.
    1. e.g. These files will be determined to be candidate files 'MIT-LICENSE', 'License.txt', 'BSD-Licence'
  3. The text version of the file (not the decorated HTML version) is downloaded.
    1. The file contents are sanitized.
    2. This means all carriage returns, new lines, and tabs are converted to spaces.
    3. Any smart quotes are replaced with vanilla quotes.
    4. All double spaces are converted to single spaces.
  4. The starting words and the ending words of the license are searched for in a case insensitive fashion.
  5. If both the above exist, then key phrases from the license are looked for.
    1. This is to account for when the license is changed (for example) from 'AUTHORS' to 'Company, LLC'
    2. If all the phrases are found, then the license matches and the HTML link is set.
  6. The pre-sanitized license contents are stored in the TPS file.
  1. The license and license contents are validated to ensure consistency.
  2. All words between 'Copyright' and the start of the license boilerplate text are extracted.
  3. 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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed