fleetlint Policy for a fleet of repositories
v0.5
Getting started

public/manifest-license/dotnet

Package manifest declares the license

Implements public/manifest-license for dotnet.

Severityinfo
Tiers1
Stacksdotnet
Scopeeach
Kindexpr
Sourcelibrary v0.2.0
Selected byfleetlint-recommended@v0.2.0

Requirement

A packable project (or Directory.Build.props) sets PackageLicenseExpression (SPDX) or PackageLicenseFile; projects that pack nothing are not checked.

Why

Registries, SBOM tools and license checkers read the manifest, not the LICENSE file.

Capability applies when

repo.public

Check

!glob("**/*.csproj").exists(f, text(f).matches(r'<(PackageId|IsPackable>\s*true)')) || (glob("**/*.csproj") + glob("**/Directory.Build.props")).exists(f, text(f).matches(r'<PackageLicense(Expression|File)>'))

Fix

Add <PackageLicenseExpression>SPDX-id</PackageLicenseExpression> to Directory.Build.props or the packable project.

Agent instruction: Set the manifest’s license field to the SPDX identifier matching the LICENSE file; ask if the LICENSE text is not a recognised license.

See: https://fleetlint.org/baseline/#public-repositories, https://fleetlint.org/stacks/#net


Generated by fleetlint docs from catalog v0.2.0.