Skip to content

Commit 15aa895

Browse files
Backport: deps: migrate mapstructure to go-viper (#22581) (#22780)
1 parent 3b8838f commit 15aa895

File tree

55 files changed

+68
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+68
-62
lines changed

.changelog/22581.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:security
2+
Migrate transitive dependency from archived `mitchellh/mapstructure` to `go-viper/mapstructure` to v2 to address [CVE-2025-52893](https://www.cve.org/CVERecord?id=CVE-2025-52893).
3+
```

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import (
9494
"net/http"
9595
9696
"github.com/hashicorp/go-cleanhttp"
97-
"github.com/mitchellh/mapstructure"
97+
"github.com/go-viper/mapstructure/v2"
9898
9999
"github.com/hashicorp/consul/api"
100100
"github.com/hashicorp/consul/lib"

agent/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"fmt"
99
"time"
1010

11-
"github.com/mitchellh/mapstructure"
11+
"github.com/go-viper/mapstructure/v2"
1212

1313
"github.com/hashicorp/hcl"
1414

agent/connect/ca/provider_aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/aws/aws-sdk-go/aws/session"
1717
"github.com/aws/aws-sdk-go/service/acmpca"
1818

19+
"github.com/go-viper/mapstructure/v2"
1920
"github.com/hashicorp/go-hclog"
20-
"github.com/mitchellh/mapstructure"
2121

2222
"github.com/hashicorp/consul/agent/connect"
2323
"github.com/hashicorp/consul/agent/structs"

agent/connect/ca/provider_consul_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"fmt"
88
"time"
99

10+
"github.com/go-viper/mapstructure/v2"
1011
"github.com/hashicorp/consul/agent/connect"
1112
"github.com/hashicorp/consul/agent/structs"
12-
"github.com/mitchellh/mapstructure"
1313
)
1414

1515
func ParseConsulCAConfig(raw map[string]interface{}) (*structs.ConsulCAProviderConfig, error) {

agent/connect/ca/provider_vault.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
"strings"
1515
"time"
1616

17+
"github.com/go-viper/mapstructure/v2"
1718
"github.com/hashicorp/go-hclog"
1819
vaultapi "github.com/hashicorp/vault/api"
19-
"github.com/mitchellh/mapstructure"
2020

2121
"github.com/hashicorp/consul/agent/connect"
2222
"github.com/hashicorp/consul/agent/structs"

agent/consul/authmethod/authmethods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"sort"
1010
"sync"
1111

12+
"github.com/go-viper/mapstructure/v2"
1213
"github.com/hashicorp/go-hclog"
13-
"github.com/mitchellh/mapstructure"
1414

1515
"github.com/hashicorp/consul/acl"
1616
"github.com/hashicorp/consul/agent/structs"

agent/consul/fsm/commands_ce_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"testing"
1414
"time"
1515

16-
"github.com/mitchellh/mapstructure"
16+
"github.com/go-viper/mapstructure/v2"
1717
"github.com/stretchr/testify/assert"
1818
"github.com/stretchr/testify/require"
1919
"google.golang.org/grpc"

agent/consul/fsm/snapshot_ce.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"fmt"
88
"net"
99

10+
"github.com/go-viper/mapstructure/v2"
1011
"github.com/hashicorp/raft"
11-
"github.com/mitchellh/mapstructure"
1212

1313
"github.com/hashicorp/consul-net-rpc/go-msgpack/codec"
1414

agent/discovery_chain_endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/mitchellh/mapstructure"
12+
"github.com/go-viper/mapstructure/v2"
1313

1414
"github.com/hashicorp/consul/acl"
1515
cachetype "github.com/hashicorp/consul/agent/cache-types"

0 commit comments

Comments
 (0)