Skip to content

feat(sbom): generate a per-service CycloneDX SBOM, starting with clouddriver - #8019

Draft
jasonmcintosh wants to merge 4 commits into
spinnaker:mainfrom
jasonmcintosh:add-clouddriver-sbom
Draft

jasonmcintosh wants to merge 4 commits into
spinnaker:mainfrom
jasonmcintosh:add-clouddriver-sbom

Conversation

@jasonmcintosh

Copy link
Copy Markdown
Member

Summary

  • Adds SpinnakerSbomPlugin (wraps the CycloneDX Gradle plugin) into the shared SpinnakerBaseProjectPlugin, so every service's root project gets a cyclonedxBom task 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.
  • Threads an opt-in generate-sbom flag through generic-build-publishpublish-docker, setting sbom: true on the docker/build-push-action steps to attach a buildx/Syft SBOM attestation to published container images. Enabled for clouddriver only, as a first rollout; every other service defaults to false with 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, one cyclonedxDirectBom per clouddriver subproject feeding the aggregate
  • ./gradlew :clouddriver:cyclonedxBom (real run) — produces clouddriver/build/reports/cyclonedx/{bom.json,bom.xml}, valid CycloneDX 1.6 document with 892 components and license metadata
  • actionlint clean on clouddriver.yml
  • Live CI run on a clouddriver PR/release to confirm the buildx SBOM attestation attaches to the pushed image (not exercised locally — needs a real docker buildx build --push)

Co-Authored-By: Claude Sonnet 5 [email protected]
https://claude.ai/code/session_012rSDN6izyGfcVcZSsFfY8B

jasonmcintosh and others added 4 commits September 14, 2026 23:27
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant