public/manifest-license/php
Package manifest declares the license
Implements public/manifest-license for php.
| Severity | info |
| Tiers | 1 |
| Stacks | php |
| Scope | each |
| Kind | expr |
| Source | library v0.7.0 |
| Selected by | fleetlint-recommended@v0.7.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.publicCheck
!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.
A finding of this rule points at composer.json.
Sources
- https://spdx.org/licenses/ (spec)
- https://fleetlint.org/baseline/#public-repositories (convention)
- https://getcomposer.org/doc/04-schema.md (spec, license)
- https://fleetlint.org/stacks/#php
Generated by fleetlint docs from catalog v0.7.0.