Skip to content

Commit

Permalink
Backport of security: Upgrade go version to 1.22.12 into release/1.20…
Browse files Browse the repository at this point in the history
….x (#22133)

* backport of commit 21adeb4

* backport of commit caa60da

* backport of commit 285c44e

---------

Co-authored-by: Abhishek <[email protected]>
  • Loading branch information
1 parent c6b6c1f commit d490035
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .changelog/22132.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:security
Upgrade Go to use v1.22.12 and bump Go X-Repositories to latest. This addresses CVE
[CVE-2025-22866](https://nvd.nist.gov/vuln/detail/CVE-2025-22866)
```
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.11
1.22.12
4 changes: 2 additions & 2 deletions agent/consul/state/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (s *Store) txnKVS(tx WriteTxn, idx uint64, op *structs.TxnKVOp) (structs.Tx
var entry *structs.DirEntry
var err error

// enumcover: api.KVOp
// enumcover:api.KVOp
switch op.Verb {
case api.KVSet:
entry = &op.DirEnt
Expand Down Expand Up @@ -137,7 +137,7 @@ func (s *Store) txnKVS(tx WriteTxn, idx uint64, op *structs.TxnKVOp) (structs.Tx
func txnSession(tx WriteTxn, idx uint64, op *structs.TxnSessionOp) error {
var err error

// enumcover: api.SessionOp
// enumcover:api.SessionOp
switch op.Verb {
case api.SessionDelete:
err = sessionDeleteWithSession(tx, &op.Session, idx)
Expand Down
10 changes: 5 additions & 5 deletions agent/consul/txn_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (t *Txn) Read(args *structs.TxnReadRequest, reply *structs.TxnReadResponse)
// nodeVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func nodeVerbValidate(op api.NodeOp) (bool, error) {
// enumcover: api.NodeOp
// enumcover:api.NodeOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.NodeGet:
Expand All @@ -283,7 +283,7 @@ func nodeVerbValidate(op api.NodeOp) (bool, error) {
// serviceVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func serviceVerbValidate(op api.ServiceOp) (bool, error) {
// enumcover: api.ServiceOp
// enumcover:api.ServiceOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.ServiceGet:
Expand All @@ -298,7 +298,7 @@ func serviceVerbValidate(op api.ServiceOp) (bool, error) {
// checkVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func checkVerbValidate(op api.CheckOp) (bool, error) {
// enumcover: api.CheckOp
// enumcover:api.CheckOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.CheckGet:
Expand All @@ -312,7 +312,7 @@ func checkVerbValidate(op api.CheckOp) (bool, error) {

// intentionVerbValidate checks for a known operation type.
func intentionVerbValidate(op structs.IntentionOp) error {
// enumcover: structs.IntentionOp
// enumcover:structs.IntentionOp
switch op {
case structs.IntentionOpCreate, structs.IntentionOpDelete, structs.IntentionOpUpdate, structs.IntentionOpDeleteAll, structs.IntentionOpUpsert:
return nil
Expand All @@ -323,7 +323,7 @@ func intentionVerbValidate(op structs.IntentionOp) error {

// sessionVerbValidate checks for a known operation type.
func sessionVerbValidate(op api.SessionOp) error {
// enumcover: api.SessionOp
// enumcover:api.SessionOp
switch op {
case api.SessionDelete:
return nil
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/api

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul/sdk => ../sdk

Expand Down
2 changes: 1 addition & 1 deletion envoyextensions/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/envoyextensions

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ../api
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ./api
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/e2e/consul/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/hashicorp/consul

go 1.22.11
go 1.22.12

require google.golang.org/protobuf v1.28.1
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/proto-gen-rpc-glue/e2e

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul => ./consul

Expand Down
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/proto-gen-rpc-glue

go 1.22.11
go 1.22.12

require github.com/stretchr/testify v1.8.4

Expand Down
2 changes: 1 addition & 1 deletion internal/tools/protoc-gen-consul-rate-limit/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/protoc-gen-consul-rate-limit

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul/proto-public => ../../../proto-public

Expand Down
2 changes: 1 addition & 1 deletion proto-public/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/proto-public

go 1.22.11
go 1.22.12

require (
google.golang.org/grpc v1.56.3
Expand Down
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/sdk

go 1.22.11
go 1.22.12

require (
github.com/hashicorp/go-cleanhttp v0.5.2
Expand Down
2 changes: 1 addition & 1 deletion test-integ/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/test-integ

go 1.22.11
go 1.22.12

require (
github.com/google/go-cmp v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion test/integration/connect/envoy/test-sds-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test-sds-server

go 1.22.11
go 1.22.12

require (
github.com/envoyproxy/go-control-plane v0.12.0
Expand Down
2 changes: 1 addition & 1 deletion test/integration/consul-container/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/test/integration/consul-container

go 1.22.11
go 1.22.12

require (
fortio.org/fortio v1.54.0
Expand Down
2 changes: 1 addition & 1 deletion testing/deployer/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/testing/deployer

go 1.22.11
go 1.22.12

require (
github.com/avast/retry-go v3.0.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion troubleshoot/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/troubleshoot

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ../api
Expand Down

0 comments on commit d490035

Please sign in to comment.