release/sbom/php
Releases publish an SBOM
Implements release/sbom for php.
| Severity | warning |
| Tiers | 1 |
| Stacks | php |
| Scope | root |
| Kind | outcome |
| Source | library v0.2.0 |
| Selected by | fleetlint-recommended@v0.2.0 |
Requirement
The release runs the CycloneDX Composer plugin (composer CycloneDX:make-sbom); or a stack-neutral producer.
Why
Consumers and scanners need to know what is inside an artifact; generating the SBOM in the pipeline ties it to the exact build.
Capability applies when
release.mechanisms.exists(m, m != "git-cliff") && tagged_workflows().size() > 0 && !(!file(".goreleaser.yaml") && !file(".goreleaser.yml")
&& tagged_workflows().exists(w, steps(w).exists(s, s.uses.startsWith("pypa/gh-action-pypi-publish")
|| s.run.matches("\\b((npm|pnpm|yarn( npm)?) publish|twine upload|(uv|poetry|flit|hatch) publish|cargo publish|gem push|(dart|flutter) pub publish|dotnet nuget push)\\b")))
&& !tagged_workflows().exists(w, steps(w).exists(s,
s.uses.matches("^(softprops/action-gh-release|ncipollo/release-action|actions/upload-release-asset|svenstaro/upload-release-action|goreleaser/goreleaser-action|docker/build-push-action)@")
|| s.run.matches("\\b(gh release (create|upload)|goreleaser|docker (buildx )?(build|push)|podman push|ko (build|publish)|release-cli|glab release|tea releases? create)\\b"))))Fix
Require cyclonedx/cyclonedx-php-composer as a dev dependency and run composer CycloneDX:make-sbom in the release workflow.
Agent instruction: In the tag-triggered release workflow add a step running syft on each artifact producing SPDX JSON files, and include them in the release upload step. Do not change other steps. If the repo uses GoReleaser, add a sboms: section instead.
See: https://fleetlint.org/baseline/#releases, https://fleetlint.org/stacks/#php
Generated by fleetlint docs from catalog v0.2.0.