Skip to content

Fix critical CVEs by upgrading Go 1.17 to 1.25 and all dependencies#266

Merged
Ramal Abeysekera (ramalabeysekera) merged 3 commits intomainfrom
go_bump
Apr 13, 2026
Merged

Fix critical CVEs by upgrading Go 1.17 to 1.25 and all dependencies#266
Ramal Abeysekera (ramalabeysekera) merged 3 commits intomainfrom
go_bump

Conversation

@ramalabeysekera
Copy link
Copy Markdown
Contributor

@ramalabeysekera Ramal Abeysekera (ramalabeysekera) commented Apr 13, 2026

Trivy scan found 6 critical vulnerabilities in the manager binary, all stem from Go 1.17 and dependencies pinned to 2022. Since the k8s libraries, controller-runtime, and cert-manager all have strict version compatibility chains, fixing any single CVE requires upgrading the entire dependency tree together.

CVEs Fixed

image

This pull request updates the project to support newer versions of Go, cert-manager, and related tooling, while also cleaning up and modernizing configuration files. The changes ensure compatibility with the latest development environments, improve code quality tooling, and update documentation to reflect these upgrades.

Dependency and Toolchain Upgrades:

  • Updated Go version to 1.25 across the Dockerfile, GitHub Actions workflows, and local development (Makefile). [1] [2] [3] [4]
  • Upgraded cert-manager references and tested version to v1.17.2 in the documentation, e2e workflow, and README. [1] [2] [3]
  • Updated controller tools and kustomize versions in the Makefile for compatibility with recent Kubernetes releases.

CI/CD and Linting Improvements:

  • Modernized GitHub Actions workflows by updating actions to their latest major versions and improving output handling. [1] [2] [3]
  • Upgraded golangci-lint and its configuration in .golangci.yml and .pre-commit-config.yaml for improved linting and code formatting, including support for new linters and formatter settings. [1] [2]

Documentation and Metadata Updates:

  • Updated documentation tables and links for accuracy and consistency, including references to the latest Kubernetes API and cert-manager documentation. [1] [2] [3] [4] [5]

Configuration Cleanup:

  • Removed the release drafter workflow and its configuration files, GH has a built-in release note generator now. (.github/release-drafter.yml, .github/workflows/release-drafter.yml) [1] [2]

Minor Code and Metadata Fixes:

  • Small corrections to code comments and formatting for consistency and compliance with current standards. [1] [2] [3]

These updates collectively modernize the project, improve maintainability, and ensure it remains compatible with current tooling and Kubernetes ecosystem standards.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the project’s Go toolchain and core dependency tree (controller-runtime/Kubernetes libs/cert-manager/Ginkgo/AWS SDK) to remediate critical CVEs identified by Trivy, along with the required controller/runtime API updates, regenerated manifests, and CI/tooling bumps.

Changes:

  • Bump Go version and modernize the dependency graph (controller-runtime, k8s.io/*, cert-manager, Ginkgo v2, AWS SDK v2).
  • Update controller wiring and tests for upstream API changes (metrics/webhook options, fake client builder, cert-manager import paths, CSR helper).
  • Refresh generated assets and tooling/CI configs (CRDs/RBAC, helm-docs output, golangci-lint v2, GitHub Actions).

Reviewed changes

Copilot reviewed 30 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Markdown table formatting adjustments.
pkg/signer/suite_test.go Migrate test suite to Ginkgo v2 APIs.
pkg/signer/kmssigner_test.go Update Ginkgo imports to v2.
pkg/kmsmock/suite_test.go Migrate test suite to Ginkgo v2 APIs.
pkg/kmsmock/kmsmock.go Update embedded RSA test keys to 2048-bit for newer Go constraints.
pkg/kmsmock/kmsmock_test.go Update Ginkgo imports to v2.
pkg/kmsca/suite_test.go Migrate test suite to Ginkgo v2 APIs.
pkg/kmsca/kmsca_test.go Update Ginkgo imports to v2.
Makefile Update envtest/kustomize/controller-tools versions.
main.go Update controller-runtime manager options for metrics/webhook API changes.
hack/boilerplate.go.txt Boilerplate formatting tweak.
go.mod Upgrade Go directive and dependency versions across the project.
Dockerfile Build image updated to Go 1.25 base.
ct.yaml Formatting-only change.
controllers/certmanager/suite_test.go Update cert-manager imports + Ginkgo v2 suite changes.
controllers/certmanager/kmskey_controller_test.go Update Ginkgo imports to v2.
controllers/certmanager/kmsissuer_controller_test.go Update Ginkgo imports to v2.
controllers/certmanager/finalizer_test.go Update Ginkgo imports to v2.
controllers/certmanager/certificaterequest_controller.go Update cert-manager imports and renamed PKI util call.
controllers/certmanager/certificaterequest_controller_test.go Replace removed cert-manager e2e helper with local CSR helper; fake client builder updates.
config/rbac/role.yaml Regenerated RBAC output (deduped/cleaned rules).
config/crd/bases/cert-manager.skyscanner.net_kmskeys.yaml Regenerated CRD with newer controller-gen output.
config/crd/bases/cert-manager.skyscanner.net_kmsissuers.yaml Regenerated CRD with newer controller-gen output.
charts/kms-issuer/README.md.gotmpl Helm-docs template formatting change.
charts/kms-issuer/README.md Regenerated helm-docs output formatting.
charts/kms-issuer/crds/cert-manager.skyscanner.net_kmskeys.yaml Regenerated chart CRD copy.
charts/kms-issuer/crds/cert-manager.skyscanner.net_kmsissuers.yaml Regenerated chart CRD copy.
apis/certmanager/v1alpha1/zz_generated.deepcopy.go Remove legacy // +build tag (Go 1.17+ build constraints).
.pre-commit-config.yaml Bump golangci-lint hook; exclude charts from YAML checks.
.golangci.yml Migrate to golangci-lint v2 config format and formatter settings.
.gitignore Formatting-only change.
.github/workflows/test-build.yml Bump checkout/setup-go; move CI to Go 1.25.
.github/workflows/release.yml YAML formatting fix.
.github/workflows/e2e.yaml Bump actions/kind/cert-manager; fix deprecated set-output usage.
.github/workflows/code-quality.yml Bump actions; update CodeQL and golangci-lint action versions; move to Go 1.25.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
Comment thread go.mod
Comment thread go.mod
Comment thread .golangci.yml
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd50bfb31d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread .pre-commit-config.yaml Outdated
@ramalabeysekera
Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c23a9d2e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread go.mod
@ramalabeysekera Ramal Abeysekera (ramalabeysekera) merged commit 9b884ad into main Apr 13, 2026
5 checks passed
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.

3 participants