Skip to content

feat(sbom): generate Go dependency SBOM via mbt sbom-create-commands - #1347

Draft
silvestre wants to merge 1 commit into
mainfrom
feat/go-sbom-devbox-makefile
Draft

silvestre wants to merge 1 commit into
mainfrom
feat/go-sbom-devbox-makefile

Conversation

@silvestre

@silvestre silvestre commented Jul 30, 2026

Copy link
Copy Markdown
Member

Issue

mbt sbom-gen only produces BOMs for known builders (maven/npm). Our Go
services use builder: custom, which it skips ("mbt is not support it by
now"), so the Go dependency graph is absent from the merged MTA SBOM — today
it covers only the two Java modules (dbtasks, scheduler).

Fix

Wire a go-sbom Makefile target (cyclonedx-gomod, CycloneDX 1.4) into the
apiserver module's sbom-create-commands in mta.tpl.yaml. mbt runs it with its
${sbom-file-name} placeholder, collects the output, and merges it into the
aggregate SBOM (--sbom-file-path) alongside the Java BOMs. Add
cyclonedx-gomod and cyclonedx-cli (mbt's merge shells out to cyclonedx)
to devbox, and drop the dead local cloud-mta-build-tool nix definition —
devbox already sources mbt from the joergdw/prspkgs flake.

sbom-create-commands is only on mbt master; verified empirically that both
1.2.47 and 1.2.49 still skip the module and never run make go-sbom. This
takes effect once devbox pulls an mbt release > 1.2.49 via the joergdw/prspkgs
flake, at which point a build should log three module SBOMs.

# Issue

`mbt sbom-gen` only produces BOMs for known builders (maven/npm). Our Go
services use `builder: custom`, which it skips ("mbt is not support it by
now"), so the Go dependency graph is absent from the merged MTA SBOM — today
it covers only the two Java modules (`dbtasks`, `scheduler`).

# Fix

Wire a `go-sbom` Makefile target (`cyclonedx-gomod`, CycloneDX 1.4) into the
apiserver module's `sbom-create-commands` in mta.tpl.yaml. mbt runs it with its
`${sbom-file-name}` placeholder, collects the output, and merges it into the
aggregate SBOM (`--sbom-file-path`) alongside the Java BOMs. Add
`cyclonedx-gomod` and `cyclonedx-cli` (mbt's merge shells out to `cyclonedx`)
to devbox, and drop the dead local `cloud-mta-build-tool` nix definition —
devbox already sources mbt from the joergdw/prspkgs flake.

`sbom-create-commands` is only on mbt master; verified empirically that both
1.2.47 and 1.2.49 still skip the module and never run `make go-sbom`. This
takes effect once devbox pulls an mbt release > 1.2.49 via the joergdw/prspkgs
flake, at which point a build should log three module SBOMs.
@silvestre
silvestre force-pushed the feat/go-sbom-devbox-makefile branch from d2d59c2 to b474d94 Compare July 30, 2026 17:02
@sonarqubecloud

Copy link
Copy Markdown

Comment thread Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants