feat(sbom): generate a per-service CycloneDX SBOM, starting with clouddriver - #8019
Draft
jasonmcintosh wants to merge 4 commits into
Draft
jasonmcintosh wants to merge 4 commits into
jasonmcintosh wants to merge 4 commits into
Conversation
…ddriver Adds a SpinnakerSbomPlugin (wrapping the CycloneDX Gradle plugin) to the shared SpinnakerBaseProjectPlugin so every service gets a root-level `cyclonedxBom` task that aggregates its subprojects into one SBOM, matching the unit Spinnaker actually ships rather than one per Gradle module or one for the whole monorepo. Also threads an opt-in `generate-sbom` flag through generic-build-publish/publish-docker to attach a buildx SBOM attestation to published container images, enabled for clouddriver only for now. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012rSDN6izyGfcVcZSsFfY8B
The buildx image-attestation SBOM only runs when actually publishing a container, which pull_request builds never do -- so PR checks showed no SBOM output at all. Generate the CycloneDX SBOM unconditionally on every run (gated only on generate-sbom, not on publish), upload bom.json/bom.xml as a workflow artifact, and add a component-count line to the job summary so it's visible without downloading anything. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012rSDN6izyGfcVcZSsFfY8B
…aker into add-clouddriver-sbom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SpinnakerSbomPlugin(wraps the CycloneDX Gradle plugin) into the sharedSpinnakerBaseProjectPlugin, so every service's root project gets acyclonedxBomtask that aggregates all of its subprojects into a single SBOM — matching the unit Spinnaker actually ships (one container image / deb per service) rather than one SBOM per Gradle module or one for the whole monorepo.generate-sbomflag throughgeneric-build-publish→publish-docker, settingsbom: trueon thedocker/build-push-actionsteps to attach a buildx/Syft SBOM attestation to published container images. Enabled forclouddriveronly, as a first rollout; every other service defaults tofalsewith no behavior change.Why
New requirements call for an SBOM per OSS project artifact. A per-service SBOM (matching each independently-versioned release pipeline already in
.github/workflows/<service>.yml) is more useful than one monorepo-wide document, since consumers deploy specific services rather than "all of Spinnaker."Test plan
./gradlew -p spinnaker-gradle-project :spinnaker-project-plugin:compileGroovy— plugin compiles./gradlew :clouddriver:cyclonedxBom --dry-run— task graph builds correctly, onecyclonedxDirectBomper clouddriver subproject feeding the aggregate./gradlew :clouddriver:cyclonedxBom(real run) — producesclouddriver/build/reports/cyclonedx/{bom.json,bom.xml}, valid CycloneDX 1.6 document with 892 components and license metadataactionlintclean onclouddriver.ymldocker buildx build --push)Co-Authored-By: Claude Sonnet 5 [email protected]
https://claude.ai/code/session_012rSDN6izyGfcVcZSsFfY8B