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

public/manifest-license/ruby

Package manifest declares the license

Implements public/manifest-license for ruby.

Severityinfo
Tiers1
Stacksruby
Scopeeach
Kindexpr
Sourcelibrary v0.5.0
Selected byfleetlint-recommended@v0.5.0

Requirement

Every gemspec sets spec.license (or spec.licenses) to an SPDX identifier.

Why

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

Capability applies when

repo.public

Check

glob("*.gemspec").all(f, text(f).matches(r'\.licenses?\s*='))

Fix

Add spec.license = "<SPDX id>" to the gemspec.

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.

A finding of this rule points at the file (glob("*.gemspec") + [""])[0] yields.

Sources


Generated by fleetlint docs from catalog v0.5.0.