Skip to content

Ship an SBOM with each binary and check for vulnerabilities - #4

Merged
levidurfee merged 1 commit into
developmentfrom
ci/sbom-govulncheck
Oct 16, 2026
Merged

levidurfee merged 1 commit into
developmentfrom
ci/sbom-govulncheck

Conversation

@levidurfee

Copy link
Copy Markdown
Contributor

Summary

SBOMs. Each release binary now gets a CycloneDX SBOM beside it, such as rypt-linux-amd64.cdx.json:

  • GoReleaser makes it with Syft v1.54.1, from the binary's own build information, so it lists exactly what was compiled in: the Go version, the rypt SDK, and x/crypto, x/sys, x/term.
  • The SBOMs are listed in SHA256SUMS. The Homebrew cask is unchanged.
  • CI installs Syft too, so the snapshot build checks SBOM generation on every PR.

govulncheck. A new vulncheck CI job fails when the code calls a function with a known vulnerability, in a module or in the standard library.

Newest Go for builds. govulncheck's first run found something:

  • With Go 1.27.0 (go.mod's version, which CI and releases used), the CLI calls into 8 vulnerable standard-library packages: net/http, net/http/internal/http2, crypto/tls and net/textproto.
  • Go 1.27.2 fixes all of them.
  • The published v0.1.0 and v0.1.1 binaries were built with Go 1.27.0 and contain those packages. A binary scan of the v0.1.1 linux/amd64 binary confirms it.

So:

  • CI and the release workflow now build with the newest Go release (go-version: stable, check-latest: true), as x6c-co/rypt does.
  • go.mod now says go 1.27.2, so go install users also get a toolchain with the fixes.

The one remaining govulncheck note is an x/crypto advisory that has no fix yet and that the CLI never calls.

Testing

  • I ran goreleaser release --snapshot --clean locally with GoReleaser v2.18.3 and Syft v1.54.1. It made six SBOMs, named after their binaries and listed in SHA256SUMS, each listing stdlib@1.27.2 and the four modules.
  • govulncheck ./... with Go 1.27.2 reports no vulnerabilities affecting the code.
  • make vet test passes.

After merging

Releasing v0.2.0 replaces the affected binaries.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NTEjHbdKp83qgQgmqR1BJ6

GoReleaser now makes a CycloneDX SBOM for each binary with Syft, from
the binary's build information, named like the binary and listed in
SHA256SUMS. CI installs Syft, so the snapshot build checks this on every
pull request.

A govulncheck job fails CI when the code calls a function with a known
vulnerability. Its first run found eight standard-library
vulnerabilities in what Go 1.27.0 builds, which v0.1.0 and v0.1.1 were
built with; Go 1.27.2 fixes them. CI and releases now build with the
newest Go release, and go.mod asks for at least 1.27.2, so that
"go install" users get the fixes too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTEjHbdKp83qgQgmqR1BJ6
@levidurfee
levidurfee merged commit 801c7ae into development Oct 16, 2026
3 checks passed
@levidurfee
levidurfee deleted the ci/sbom-govulncheck branch October 16, 2026 00:59
@levidurfee levidurfee mentioned this pull request Oct 16, 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.

1 participant