feat(ci): add CycloneDX SBOM generation to project CI pipeline#1048
Conversation
Generates a CycloneDX 1.5 JSON SBOM from composer.lock during
`shopware-cli project ci`. Output is opt-in via .shopware-project.yml:
build:
sbom:
enabled: true
path: sbom.cdx.json # optional, default sbom.cdx.json
include_dev: false # optional
License identifiers are validated against the embedded SPDX database
so non-SPDX values (e.g. "proprietary") land in license.name rather
than license.id, per the CycloneDX spec.
Drop the build.sbom.enabled opt-in flag; the SBOM is now produced unconditionally during `shopware-cli project ci`. The step is a no-op when composer.lock is absent, and path/include_dev remain configurable under build.sbom.
Bumps the spec version to the current CycloneDX release (1.7) and
migrates metadata.tools to the structured `{components: [...]}`
shape required by 1.6+; the legacy flat array form is no longer
emitted.
💡 Codex Reviewshopware-cli/cmd/project/ci.go Lines 113 to 115 in 6b0e43a This sets shopware-cli/cmd/project/project_worker.go Line 107 in 6b0e43a In Docker mode this assigns shopware-cli/cmd/project/project_logs.go Lines 149 to 155 in 6b0e43a This ring-buffer logic panics for invalid ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
Summary
composer.lockduringshopware-cli project ci.shopware-project.ymlswxsymlink to Arch Linux, Nix, NFPM, and Homebrew Cask packagingTest plan
go test ./cmd/project/ -run TestGenerateProjectSBOM— verifies default output (excludes dev deps)go test ./cmd/project/ -run TestGenerateProjectSBOMIncludeDev— verifiesIncludeDev: truego test ./cmd/project/ -run TestGenerateProjectSBOMSkipsWhenLockMissing— verifies graceful skipgo test ./internal/sbom/...— full CycloneDX generation coveragego vet ./...— no new issues