Skip to content

feat(helmBuild): generate SBOM on the publish path - #5856

Open
fabienfritz wants to merge 1 commit into
masterfrom
ffritz/helmBuild-add-sbom
Open

feat(helmBuild): generate SBOM on the publish path#5856
fabienfritz wants to merge 1 commit into
masterfrom
ffritz/helmBuild-add-sbom

Conversation

@fabienfritz

@fabienfritz fabienfritz commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Add CycloneDX SBOM Generation to helmBuild Step

Description

helmBuild (formerly helmExecute) now generates CycloneDX 1.4 SBOMs when a
chart is published with createBOM: true. SBOM generation runs only after a
successful publish
— a failed publish produces no artifact to describe.

Two SBOMs are produced, sharing a single discovered image set so they describe
the same images:

  • Chart SBOM (bom-helm.xml) — a chart-level BOM with a pkg:helm PURL for
    the published chart. Pure-Go, no network.
  • Container SBOMs (bom-docker-<N>.xml) — one per container image referenced
    by the chart, produced with Syft. Images are discovered by rendering the chart
    (helm template), falling back to the containerImageNameTags CPE list.

Both are best-effort: a failure is logged but never fails the step.

New step parameters

  • createBOM (bool, default false) — enable SBOM generation.
  • syftDownloadUrl (string) — download URL of the Syft linux amd64 binary.
  • containerImageNameTags ([]string) — fallback image list, typically from an
    upstream kanikoExecute step (container/imageNameTags CPE).

Generated BOMs are collected via a reports output (**/bom-*.xml, type sbom).

Refactoring

  • The registry-free docker PURL construction (workaround for
    anchore/syft#1408, where Syft
    omits the root component's PURL) is factored out of kanikoExecute into
    piperutils.BuildRegistryFreeDockerPurl / ParsePurl and shared by both steps.

Tests

  • Unit tests for chart/container SBOM generation, image discovery, PURL
    injection, and the shared piperutils helpers.
  • A TestHelmIntegration integration test that runs a real helmBuild publish
    against a WebDAV sidecar and asserts bom-helm.xml is produced and passes
    CycloneDX 1.4 validation, with no container images (no Syft download).
  • GHA pipelines : test of different use cases using GHA pipeline. SBOM file validation done.
  • Jenkins pipeline: execution done with case helm publish=true.
  • ADO pipeline: execution done with case helm publish=true.

Checklist

  • Tests

  • Documentation

  • Inner source library needs updating

  • 🔄 Regenerate and Update Summary

PR Bot Information

Version: 1.29.6

  • Correlation ID: 76bc11a0-8b74-11f1-93c3-d9c03e937050
  • Event Trigger: issue_comment.edited

@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

1 similar comment
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz force-pushed the ffritz/helmBuild-add-sbom branch from e95849e to ec39ed3 Compare July 30, 2026 07:45
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz marked this pull request as ready for review July 30, 2026 07:58
@fabienfritz
fabienfritz requested review from a team as code owners July 30, 2026 07:58

@fskhiri fskhiri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocker, to findings worth look at it. Let me know what do you think ?

Comment thread cmd/helmBuild.go
Comment thread pkg/kubernetes/helm.go
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz force-pushed the ffritz/helmBuild-add-sbom branch from d0f5815 to 2a4d98d Compare August 5, 2026 13:25
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz requested a review from fskhiri August 5, 2026 13:27
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz force-pushed the ffritz/helmBuild-add-sbom branch from f24ba99 to 5b1558a Compare August 7, 2026 07:48
@fskhiri

fskhiri commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/it-go

1 similar comment
@fabienfritz

Copy link
Copy Markdown
Contributor Author

/it-go

@fabienfritz
fabienfritz force-pushed the ffritz/helmBuild-add-sbom branch from 7d038a9 to f6e6a0c Compare August 11, 2026 16:01
@fabienfritz fabienfritz changed the title feat(helmExecute): generate SBOM on the publish path and build traceability feat(helmBuild): generate SBOM on the publish path Aug 11, 2026
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.

2 participants