Skip to content

fix: use chainguard/git base image for releases#112

Merged
vdemeester merged 1 commit into
mainfrom
fix/goreleaser-base-image
Jun 4, 2026
Merged

fix: use chainguard/git base image for releases#112
vdemeester merged 1 commit into
mainfrom
fix/goreleaser-base-image

Conversation

@vdemeester
Copy link
Copy Markdown
Member

Changes

The goreleaser kos: section used golang:1.25 (808MB) as the base image for
release container images. Goreleaser ignores .ko.yaml, so even though .ko.yaml
correctly specifies cgr.dev/chainguard/git, releases were built with the full
Go SDK image.

This results in:

  • 808MB image instead of 76MB
  • Hundreds of unnecessary packages (compilers, tools, libraries)
  • Poor security scan results on Artifact Hub due to CVEs in unrelated packages

Switched to cgr.dev/chainguard/git — a minimal image with only git and its
dependencies, maintained and patched by Chainguard.

Submitter Checklist

Release Notes

Switch release image base from golang:1.25 (808MB) to cgr.dev/chainguard/git (76MB), reducing image size and CVE surface.

The goreleaser kos: section had golang:1.25 (808MB) as base image,
while .ko.yaml correctly uses cgr.dev/chainguard/git (76MB).
Goreleaser ignores .ko.yaml so the base must be set in both places.

golang:1.25 is a full Go SDK image with hundreds of unnecessary
packages, resulting in a large attack surface and many CVEs in
security scans (visible on Artifact Hub).

cgr.dev/chainguard/git is a minimal image with only git and its
dependencies, patched and maintained by Chainguard.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@tekton-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from vdemeester after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 4, 2026
@vdemeester vdemeester merged commit 0ffda8e into main Jun 4, 2026
2 checks passed
@vdemeester vdemeester deleted the fix/goreleaser-base-image branch June 4, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants