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

public/manifest-license/php

Package manifest declares the license

Implements public/manifest-license for php.

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

Requirement

A library’s composer.json has license (an SPDX identifier or a list of them); "type": "project" (an application) is not checked.

Why

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

Capability applies when

repo.public

Check

!file("composer.json") || json("composer.json") == null || (has(json("composer.json").type) && json("composer.json").type == "project") || has(json("composer.json").license)

Fix

Add "license": "<SPDX id>" to composer.json.

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/#php


Generated by fleetlint docs from catalog v0.2.0.